wallet_addEthereumChain does not overwrite the network config if chainId already exists

未关闭
#421 4 条评论 1 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@vandan 已经在做这个了。

开始于 2024年1月10日。

评估

这个 Issue 还没有评估数据。

描述

team-wallet-api-platform wallet

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 ?

主要语言
MDX
星标
869
派生
2.1k
平均合并
58 分钟
30 天内合并 PR
2

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MetaMask/metamask-docs 的其他 Issue

查看 MetaMask/metamask-docs 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。