1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/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
..
_locales Include trade.value in calculation of displayed network fees (#9621) 2020-10-27 16:32:21 -02:30
fonts Add euclid fontface (#9018) 2020-07-27 17:15:44 -05:00
images Update main-quote-summary designs/styles (#9612) 2020-10-25 10:53:34 -02:30
manifest Version v8.1.2 2020-10-19 21:32:37 +00:00
scripts Fix swaps when initial network not Mainnet (#9745) 2020-10-28 16:17:32 -02:30
vendor/trezor Close window after opening fullscreen (#6966) 2019-08-08 11:50:32 -03:00
home.html Add optional portal to Popover component (#8253) 2020-03-30 18:25:17 -02:30
loading.html refactor & change html pages 2019-05-04 18:57:19 +02:00
notification.html Fix connection modal style issues (#8433) 2020-05-04 12:04:41 -03:00
phishing.html Backport "Updating deprecated Etherscam link (#7464)" (#8463) 2020-04-29 18:40:34 -03:00
popup.html Add optional portal to Popover component (#8253) 2020-03-30 18:25:17 -02:30
trezor-usb-permissions.html trezor v5 working on firefox 2018-08-05 02:43:02 -04:00