MetaMask / MetaMask/metamask-docs

wallet_addEthereumChain does not overwrite the network config if chainId already exists

Aperta
#421 4 commenti 1 reazione 1 assegnatario Assegnata a @vandan Vedi su GitHub
team-wallet-api-platform wallet
Lingua principale
MDX
Stelle
861
Fork
2.1k
Merge medio
6g 10h
PR unite (30g)
10

Descrizione

Encountering a situation where a Dapp may use wallet_addEthereumChain to switch the user's MetaMask network settings to a better performing RPC endpoint (this is for an alternative L1, i.e. not a default MetaMask chain).

Noticed that if the chainId already exists in the user's network settings in the user's MetaMask browser extension, the wallet_addEthereumChain method does not do anything, specifically it does not overwrite the existing RPC endpoint settings.

Is this on purpose, or something that could be fixed so that the method overwrite the RPC endpoint settings ?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.