At polymarket.com we’re interested in adding support for MetaMask, but our app touches both Matic and the root Ethereum chain and the UX around forcing users to manually switch networks leaves a lot to be desired. Switching to Matic works fine because the rpc method
wallet_addEthereumChain asks the user to switch the network if the network has already been added. For switching to the root Ethereum chain, this method throws an error, though.
I’d like to request either 1) switching to the network if the network already exists instead of throwing an error or alternatively 2) adding another rpc method to enable switching networks. This new method could be called
I expect more applications to encounter this problem as more applications switch to Matic, Optimism, and other Layer 2s. It would be awesome if MetaMask could stay ahead of the curve and you already have a lot hard work done to add this feature!