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

autoConnectLastWallet causes blank account modal #2065

Open
1 task done
clement4saunier opened this issue Feb 14, 2024 · 2 comments
Open
1 task done

autoConnectLastWallet causes blank account modal #2065

clement4saunier opened this issue Feb 14, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@clement4saunier
Copy link

clement4saunier commented Feb 14, 2024

Current Behavior

When using autoConnectLastWallet and switching wallets (Rabby/Metamask) or disconnecting, a user triggering connectWallet is prompted with a blank account center modal with 0 available wallets and message: 'XXX only supports MetaMask on this platform. Please use or install one of the supported wallets to continue'.

Triggering connectWallet again seems to reset and work as expected.

Expected Behavior

If previously connected wallet fails to auto connect, calling connectWallet should display every wallet defined in the onboard configuration.

Steps To Reproduce

  1. Connect to a dApp configured with {connect: {autoConnectLastWallet: true}} using MetaMask or Rabby .
  2. Replace onboard.js:last_connected_wallet in local storage with the other wallet (['MetaMask'] => ['Rabby'] or ['Rabby'] => ['MetaMask'].
  3. Refresh the app and try to connect again.

What package is effected by this issue?

@web3-onboard/core

Is this a build or a runtime issue?

Runtime

Package Version

2.21.2

Node Version

v20.8.1

What browsers are you seeing the problem on?

Chrome, Safari

Relevant log output

No response

Anything else?

No response

Sanity Check

  • If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.
@clement4saunier
Copy link
Author

Hi any new on this ? This issue is confusing our users and seems like the only solution at our disposal is to use another provider entirely.

@Adamj1232
Copy link
Member

Hi @clement4saunier thanks for raising this issue.
Which version of the web3-onboard/injected-wallets package are you using?
This may be due to a namespace collision on the provider where Rabby sets the isMetaMask flag as true, and if so this should be solved with the latest version of the injected-wallets package.

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

No branches or pull requests

4 participants