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] Modal doesn't properly disconnect when disconnecting - @web3modal/ethers #2288

Open
hmzakhalid opened this issue May 20, 2024 · 1 comment · May be fixed by #2289
Open

[bug] Modal doesn't properly disconnect when disconnecting - @web3modal/ethers #2288

hmzakhalid opened this issue May 20, 2024 · 1 comment · May be fixed by #2289
Labels
bug Something isn't working needs review

Comments

@hmzakhalid
Copy link
Contributor

hmzakhalid commented May 20, 2024

Link to minimal reproducible example

https://lab.web3modal.com/library/ethers/

Summary

The @web3modal/ethers library is not handling the disconnect logic correctly. When selecting MetaMask from the modal, the MetaMask extension does not pop up, and it auto-connects the wallet instead.

Steps to Reproduce

  1. Open the WalletConnect Modal:

    • Launch the modal to connect to a wallet.
  2. Select MetaMask:

    • Select MetaMask from the modal options.
  3. Select a Wallet:

    • Select a Wallet from the Metamask Pop up .
  4. Disconnect and Try to Connect Again:

    • Attempt to disconnect the MetaMask wallet.
    • Open the modal again to select MetaMask.
    • The wallet should connect automatically.

Expected Behavior

Each time the WalletConnect modal is opened, it should prompt the MetaMask extension to pop up and allow the user to select the wallet they want to connect to. This should happen every time the modal is launched, ensuring the user can switch between different wallets as needed.

Actual Behavior

When selecting MetaMask, the extension does not pop up, and the wallet auto-connects. This prevents the user from selecting a different wallet each time, which is necessary for certain use cases.

List of related npm package versions

@web3modal/ethers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs review
Projects
None yet
2 participants
@hmzakhalid and others