Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 未配置 EIP6963 的情况下无法检测到 MetaMask 的安装状态 #1123

Closed
yutingzhao1991 opened this issue Aug 30, 2024 · 3 comments · Fixed by #1150
Closed

[Bug] 未配置 EIP6963 的情况下无法检测到 MetaMask 的安装状态 #1123

yutingzhao1991 opened this issue Aug 30, 2024 · 3 comments · Fixed by #1150

Comments

@yutingzhao1991
Copy link
Collaborator

What happens?

image

已经安装了钱包,但是这里是置灰的。看了一下:

    const hasExtensionInstalled = async () => {
      const provider = await injectedConnector?.getProvider?.();
      return !!provider;
    };

这个判断逻辑似乎不好使了,不知道是不是 wagmi 更新了。

How To Reproduce

https://web3.ant.design/components/ethereum#support-switch-chains

@gin-lsl
Copy link
Collaborator

gin-lsl commented Sep 3, 2024

是插件加载的慢了吗?我这里是正常的。

@yutingzhao1991
Copy link
Collaborator Author

是插件加载的慢了吗?我这里是正常的。

image

要看这个例子

@yutingzhao1991
Copy link
Collaborator Author

破案了,原因是因为安装了 TokenPocket 插件,抢占了 window.ethereum,所以项目中使用还是要打开 EIP6963.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants