Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetworkController: Use the same middleware stack as the extension #1116
NetworkController: Use the same middleware stack as the extension #1116
Changes from 62 commits
c33d89c
8189e3a
48cad87
f213f24
a3ad5d1
87a2323
ab385f0
1e83353
cb17fbe
9acf3bb
d5dacd5
c115bb2
1de386f
95f152c
3835661
a759057
d48f257
998a611
85735b3
507710d
76643a8
92040ea
2322306
f12a65e
1fd7246
30ca47f
3d1ec25
be564e7
683d77f
dcc0d47
ccb87a3
76145b8
f702ba3
41a5182
ef644f0
4650a6d
2c46e85
306bf54
fd14151
8bc6de5
009e854
366138c
b7731fe
ae08915
7afc2d3
6c76aa4
61a255b
61f8b9c
5fae751
02087e6
c3e0b7a
6c0da5e
d06f8e4
7a27505
b5f3b0f
cf9ae84
398b1ce
35b35f1
de93343
013ec7a
2963d14
e1c7795
ced37b0
53347ef
133b5fd
6d0d6f6
14eec34
f660310
3d24650
c3b2849
893d5ae
267eab4
32736e8
e5940ee
2fb0d47
81cbd16
956110a
4a2888d
8f6251a
3281087
49dd75a
12a73d5
322f457
643b0fa
39331ca
9a23693
78e3bd0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at updating this in a separate PR, but it's probably safer not to, since this is the version web3-provider-engine expects and uses as a default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉🎉🎉🎉🎉🎉🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checks for
chainId
were added because we need to convertchainId
from a decimal number to a hexadecimal number (the provider config object in this version of NetworkController stores achainId
in decimal, butcreateNetworkClient
takes achainId
in hex in order to create a static middleware foreth_chainId
). This requires thatchainId
be something.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Add this validation in a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check for
rpcTarget
was added becausecreateNetworkClient
needs one in order to pass it along to thefetch
middleware.