[x] The add chain functionality is breaking in almost all the dApps. Normally, DApps will not try to call wallet_addEthereumChain directly. Instead, DApps will call wallet_addEthereumChain when it failed to switch to that chain.
When switch chain error happens, throw an error with error.code set to 4902
Issues
wallet_addEthereumChain
directly. Instead, DApps will callwallet_addEthereumChain
when it failed to switch to that chain.4902
preload.js
, causing some DApp crashes, e.g.https://app.ebisusbay.com/