1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00
metamask-extension/test
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
..
data Use chainId values for the address book (#9565) 2020-10-12 16:35:55 -07:00
e2e Robustify waiting logic in e2e test (#9704) 2020-10-23 16:24:20 -07:00
lib Add prettier-plugin-sort-json (#9450) 2020-09-23 12:21:42 -02:30
stub Fix fetching of swap quotes when initial network was testnet (#9726) 2020-10-27 13:22:21 -02:30
unit Fix swaps when initial network not Mainnet (#9745) 2020-10-28 16:17:32 -02:30
unit-global Fix no-empty-function issues (#9216) 2020-08-14 09:17:02 -02:30
env.js Remove cross-env (#7950) 2020-01-30 14:11:26 -03:30
helper.js Update @metamask/eslint-config to v4.1.0 (#9663) 2020-10-21 14:01:03 -02:30
setup.js Remove obs-store babel register handling (#8413) 2020-04-27 07:54:42 -07:00