web3modal icon indicating copy to clipboard operation
web3modal copied to clipboard

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

Open hmzakhalid opened this issue 1 year ago • 1 comments

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

hmzakhalid avatar May 20 '24 16:05 hmzakhalid