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

Fix/wallet locked issue #1698

Closed
wants to merge 4 commits into from
Closed

Fix/wallet locked issue #1698

wants to merge 4 commits into from

Conversation

svenvoskamp
Copy link
Contributor

Changes

  • fix: Fix wallet locked autoconnect issue

Copy link

vercel bot commented Jan 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
web3modal-gallery ✅ Ready (Inspect) Visit Preview Jan 3, 2024 3:10pm
web3modal-laboratory ✅ Ready (Inspect) Visit Preview Jan 3, 2024 3:10pm
web3modal-react-wagmi-ex ✅ Ready (Inspect) Visit Preview Jan 3, 2024 3:10pm
web3modal-vue-wagmi-ex ✅ Ready (Inspect) Visit Preview Jan 3, 2024 3:10pm

Comment on lines +80 to +81
(eip6963Wallet && eip6963Wallet.provider._state?.isUnlocked === undefined) ||
(eip6963Wallet && eip6963Wallet.provider._state?.isUnlocked)
Copy link
Collaborator

@tomiir tomiir Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be the same to check
if (eip6963Wallet && eip6963Wallet.provider?._state?.isUnlocked === true) { return true }

Copy link
Contributor

@glitch-txs glitch-txs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a standard and some wallets might not have it, let's rather check for eth_account which should return an empty array when locked or disconnected.

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 this pull request may close these issues.

3 participants