metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

addEthereumChain not working on chain with chain_id of 10

Open danfinlay opened this issue 4 years ago • 1 comments

A QBS customer says:

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?

danfinlay avatar Oct 06 '21 16:10 danfinlay

Related to #3581

gantunesr avatar Jan 21 '22 02:01 gantunesr

+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).

defispartan avatar Oct 25 '23 15:10 defispartan