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] pure EIP6963 wallets are not displayed #2769

Closed
bulgakovk opened this issue Aug 29, 2024 · 4 comments · Fixed by #2777
Closed

[bug] pure EIP6963 wallets are not displayed #2769

bulgakovk opened this issue Aug 29, 2024 · 4 comments · Fixed by #2777
Assignees
Labels
bug Something isn't working

Comments

@bulgakovk
Copy link
Contributor

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 (no window.ethereum injection) in the wallets list even though it's been detected

Technical 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 on window.ethereum:
https://github.com/WalletConnect/web3modal/blob/e134074d329f1b3a7325245f1ebac3eb0b8f47cd/packages/base/adapters/evm/wagmi/client.ts#L260-L262

which 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.:

          if (connector.info?.rdns === undefined && !ConnectionController.checkInstalled(undefined, connector.chain)) { 
             this.style.cssText = `display: none` 
  
             return null 
           } 

List of related npm package versions

"@web3modal/wagmi": "5.1.4"

@bulgakovk bulgakovk added bug Something isn't working needs review labels Aug 29, 2024
@glitch-txs
Copy link
Contributor

Would you like to open a PR?

Also how can we repro this?

Thanks!

@bulgakovk
Copy link
Contributor Author

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!

@frndxyz
Copy link

frndxyz commented Sep 25, 2024

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"
},

Screenshot 2024-09-25 at 12 21 31 PM

@DobromirKirovLime
Copy link

same here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants