1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 03:36:18 +02:00
metamask-extension/test/unit/app
Mark Stacey 1294955d81
Fix swaps when initial network not Mainnet (#9745)
This is a continuation of #9726, which did not fix the problem
described.

If the initial network when the extension is started is something other
than Mainnet, the swaps controller will never successfully retrieve
swap quotes. This is because `ethers` will continue to communicate
with whichever network the provider was initially on.

We tried fixing this by hard-coding the `chainId` to Mainnet's
`chainId` when constructing the Ethers provider, but this did not work.
I suspect this failed because the `provider` we pass to `ethers` is not
compliant with EIP 1193, as `ethers` doubtless expects it to be.

Instead the entire `ethers` provider is now reconstructed each time the
network changes. This mirrors the approach we take in some other
controllers.
2020-10-28 16:17:32 -02:30
..
controllers Fix swaps when initial network not Mainnet (#9745) 2020-10-28 16:17:32 -02:30
account-import-strategies.spec.js Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30
buy-eth-url.spec.js Update Wyre purchase URL (#9414) 2020-09-15 17:56:51 -02:30
cleanErrorStack.spec.js Update ESLint rules for test suite (#8023) 2020-02-11 13:21:13 -03:30
ComposableObservableStore.js Fix import/order issues (#9239) 2020-08-18 16:48:25 -02:30
fetch-with-timeout.test.js Enable arrow-parens ESLint rule 2020-02-15 17:04:21 -03:30
message-manager-test.js Fix no-empty-function issues (#9216) 2020-08-14 09:17:02 -02:30
nodeify-test.js Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30
personal-message-manager-test.js Fix no-empty-function issues (#9216) 2020-08-14 09:17:02 -02:30
seed-phrase-verifier-test.js Replace clone dependency with cloneDeep from lodash (#7926) 2020-01-29 13:14:33 -04:00
typed-message-manager.spec.js Fix signTypedData_v4 chainId param validation (#9552) 2020-10-12 12:10:19 -07:00
util-test.js Merge pull request from GHSA-c2xw-px2x-pr65 2020-10-06 15:27:02 -02:30