Closed bulgakovk closed 1 month ago
Would you like to open a PR?
Also how can we repro this?
Thanks!
Would you like to open a PR?
Sure, will do on Monday
Also how can we repro this?
https://github.com/ExodusMovement/web3modal-eip6963-bug/tree/master
Thanks for the quick response!
i am using appkit 1.0.4 but still have same issue. (metamask,okex,trustwallet) not showing in modal list. also none of social option shows in list. i tried to connect with QR wallet connect. it works but isConnected status not changed. webmodal shows:
"dependencies": { "@reown/appkit": "^1.0.4", "@reown/appkit-adapter-wagmi": "^1.0.4", "@tanstack/react-query": "^5.56.2", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^6.26.2", "viem": "^2.21.14", "wagmi": "^2.12.13" },
same here...
Link to minimal reproducible example
https://github.com/ExodusMovement/web3modal-eip6963-bug/tree/master
Summary
Summary
web3modal
does not display a pure EIP-6963 wallet (nowindow.ethereum
injection) in the wallets list even though it's been detectedTechnical details
The web3modal connection button checks if a wallet is installed before displaying it: https://github.com/WalletConnect/web3modal/blob/543585f87756d242903d9ff48c7e3c7070be0d8e/packages/scaffold-ui/src/partials/w3m-connect-injected-widget/index.ts#L57-L61
checkInstalled
internally relies onwindow.ethereum
: https://github.com/WalletConnect/web3modal/blob/e134074d329f1b3a7325245f1ebac3eb0b8f47cd/packages/base/adapters/evm/wagmi/client.ts#L260-L262which is undefined if a wallet utilizes the EIP-6963 only and does not inject its provider to
window.ethereum
. That means a wallet like that will be never displayed unless other wallet injects its provider to the ethereum namespace.Possible solution
I think the condition I mentioned above should be relaxed by checking installation only for non EIP-6963 wallets, e.g.:
List of related npm package versions
"@web3modal/wagmi": "5.1.4"