-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Merged
Merged
Changes from all commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
c33d89c
Added network clients
BelfordZ 8189e3a
Implement PR feedback
BelfordZ 48cad87
Fix linting issues
BelfordZ f213f24
Change chainId hex conversion to use controller utils
BelfordZ a3ad5d1
Remove dist from imports
BelfordZ 87a2323
Change InfuraNetworkType to exclude keys from NetworkType
BelfordZ ab385f0
Remove throwing when using setProviderType, throws inside of configur…
BelfordZ 1e83353
Fix typing issue after changing InfuraNetworkType
BelfordZ cb17fbe
lint fix
BelfordZ 9acf3bb
Remove old networkclient test files
BelfordZ d5dacd5
fix more rebase issues
BelfordZ c115bb2
Added PR feedback
BelfordZ 1de386f
Undo unnecessary change
Gudahtt 95f152c
Extract FakeBlockTracker to separate file; improve stub
mcmire 3835661
Rename fake-provider-engine to match class; simplify impl
mcmire a759057
No need to account for provider errors
mcmire d48f257
No need to 'stop' the provider anymore
mcmire 998a611
Make InfuraNetworkType a 'real' enum
mcmire 85735b3
Merge branch 'main' into added-network-clients-rebased
mcmire 507710d
Extract INFURA_NETWORKS to match the extension
mcmire 76643a8
Don't make the reader do hex conversion in their head
mcmire 92040ea
Document this new behavior
mcmire 2322306
No need to mock eth-json-rpc-middleware and eth-json-rpc-provider
mcmire f12a65e
Fix failing test resulting from merge conflicts
mcmire 1fd7246
Fix formatting
mcmire 30ca47f
Tweak these error messages
mcmire 3d1ec25
Tweak these names to match the objects they represent
mcmire be564e7
Get most of the network client test files matching extension (except …
mcmire 683d77f
Match shared-tests to the extension
mcmire dcc0d47
Fix lint issues
mcmire ccb87a3
Match the extension better in the unit tests
mcmire 76145b8
Merge branch 'main' into added-network-clients-rebased
mcmire f702ba3
Fix TypeScript issues
mcmire 41a5182
We can give Provider and BlockTracker proper types now
mcmire ef644f0
Rename buildFakeClient to buildFakeNetworkClient, have its provider b…
mcmire 4650a6d
Fix all cases of using 0x-prefix hex strings when it would throw an e…
mcmire 2c46e85
These arguments always get passed
mcmire 306bf54
Throw if infuraProjectId is not set
mcmire fd14151
Revert these changes as they are unnecessary for now
mcmire 8bc6de5
Fix failing tests
mcmire 009e854
Use 'any' for TransactionController provider and blockTracker
mcmire 366138c
Add missing tests
mcmire b7731fe
Change this back to make test copying easier
mcmire ae08915
Revert "We can give Provider and BlockTracker proper types now"
mcmire 7afc2d3
Revert "Use 'any' for TransactionController provider and blockTracker"
mcmire 6c76aa4
Merge branch 'main' into added-network-clients-rebased
legobeat 61a255b
Merge branch 'main' into added-network-clients-rebased
legobeat 61f8b9c
Merge branch 'main' into added-network-clients-rebased
mcmire 5fae751
Merge branch 'main' into added-network-clients-rebased
mcmire 02087e6
Remove unnecessary ESLint config file
mcmire c3e0b7a
Don't need this ESLint override anymore
mcmire 6c0da5e
Fix build failure
mcmire d06f8e4
Merge branch 'main' into added-network-clients-rebased
mcmire 7a27505
Align closer to refactor-network-client branch
mcmire b5f3b0f
Fix TransactionController tests
mcmire cf9ae84
Merge branch 'main' into added-network-clients-rebased
mcmire 398b1ce
Fix lint issue
mcmire 35b35f1
Merge branch 'main' into added-network-clients-rebased
mcmire de93343
Fixes
mcmire 013ec7a
More fixes
mcmire 2963d14
Fix failing test
mcmire e1c7795
Fix failing test
mcmire ced37b0
Merge branch 'main' into added-network-clients-rebased
mcmire 53347ef
Fix lint
mcmire 133b5fd
Fix tests
mcmire 6d0d6f6
Merge branch 'main' into added-network-clients-rebased
mcmire 14eec34
Merge branch 'main' into added-network-clients-rebased
mcmire f660310
I guess we don't need this change right now, we can always add this l…
mcmire 3d24650
Merge branch 'main' into added-network-clients-rebased
mcmire c3b2849
Bump eth-block-tracker to 7.0.1
mcmire 893d5ae
Fix lint
mcmire 267eab4
Roll these particular changes back
mcmire 32736e8
Merge remote-tracking branch 'origin/main' into added-network-clients…
Gudahtt e5940ee
Fix lint error
Gudahtt 2fb0d47
Fix test
Gudahtt 81cbd16
Remove unnecessary lint rule
Gudahtt 956110a
Remove unnecessary test changes
Gudahtt 4a2888d
Use unknown instead of any for fake provider params
Gudahtt 8f6251a
Merge branch 'main' into added-network-clients-rebased
mcmire 3281087
Fix failing AssetsContractController test
mcmire 49dd75a
Oh, actually, we don't need these changes
mcmire 12a73d5
We can test eth_subscribe and eth_unsubscribe now
mcmire 322f457
Merge branch 'main' into added-network-clients-rebased
mcmire 643b0fa
Drop these minor changes as well
mcmire 39331ca
Make this chain ID more clear
mcmire 9a23693
Update packages/network-controller/tests/NetworkController.test.ts
mcmire 78e3bd0
Merge remote-tracking branch 'origin/main' into added-network-clients…
Gudahtt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,27 +31,27 @@ | |
"dependencies": { | ||
"@metamask/base-controller": "workspace:^", | ||
"@metamask/controller-utils": "workspace:^", | ||
"@metamask/eth-json-rpc-infura": "^8.0.0", | ||
"@metamask/eth-json-rpc-middleware": "^11.0.0", | ||
"@metamask/eth-json-rpc-provider": "^1.0.0", | ||
"@metamask/swappable-obj-proxy": "^2.1.0", | ||
"@metamask/utils": "^5.0.2", | ||
"async-mutex": "^0.2.6", | ||
"babel-runtime": "^6.26.0", | ||
"eth-json-rpc-infura": "^5.1.0", | ||
"eth-block-tracker": "^7.0.1", | ||
"eth-query": "^2.1.2", | ||
"eth-rpc-errors": "^4.0.2", | ||
"immer": "^9.0.6", | ||
"uuid": "^8.3.2", | ||
"web3-provider-engine": "^16.0.5" | ||
"json-rpc-engine": "^6.1.0", | ||
"uuid": "^8.3.2" | ||
Comment on lines
-42
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎉🎉🎉🎉🎉🎉🎉 |
||
}, | ||
"devDependencies": { | ||
"@json-rpc-specification/meta-schema": "^1.0.6", | ||
"@metamask/auto-changelog": "^3.1.0", | ||
"@metamask/eth-json-rpc-provider": "^1.0.0", | ||
"@types/jest": "^27.4.1", | ||
"@types/lodash": "^4.14.191", | ||
"deepmerge": "^4.2.2", | ||
"eth-block-tracker": "^7.0.1", | ||
"jest": "^27.5.1", | ||
"json-rpc-engine": "^6.1.0", | ||
"lodash": "^4.17.21", | ||
"nock": "^13.0.7", | ||
"sinon": "^9.2.4", | ||
|
mcmire marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.