metamask-mobile
metamask-mobile copied to clipboard
addEthereumChain not working on chain with chain_id of 10
Currently, we are developing a blockchain application to be used on the Metamask Mobile dApp browser. We require the use of the methods 'wallet_switchEthereumChain' and 'wallet_addEthereumChain'. However, the popups to add a new chain and to switch chains do not work, and give the error, 'May not specify default Metamask chain'. This error does not appear on the desktop version of the metamask extension. The deployed QBS network is on chain ID: 10. Is there a way to change the chain ID? Or are there any fixes for the Metamask Mobile bug?
Related to #3581
+1 on this, it is not just chainID 10, MetaMask mobile throws this error when attempting to add any chainID in their default list:
Object { code: 5000, message: '{"code":-32602,"message":"May not specify default MetaMask chain."}' }
This is a significant because it does not allow testing of fork networks with the same underlying chainID, which is necessary if you want to test signatures with the chainID encoded (such as EIP-2612 permit).