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] Onboard wallet state not updating correctly when switching chains with Coin98 wallet #1907

Open
1 task done
rueyce opened this issue Sep 11, 2023 · 3 comments
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@rueyce
Copy link

rueyce commented Sep 11, 2023

Current Behavior

When switching to another chain with injected Coin98 wallet, onboard wallet state does not update correctly.

Expected Behavior

Onboard wallet state should reflect new chain and wallet address.

Steps To Reproduce

Using example in the docs

  1. Visit https://onboard.blocknative.com/examples/connect-wallet
  2. Connect with Coin98 wallet
  3. Using the transaction preview widget on the bottom right of the page, change to a new network
  4. After completing the network change request in the wallet, onboard state still shows previous chain and wallet address

Alternatively, https://github.com/rueyce/web3-onboard-vuejs-example which is just a slight modification to the docs-provided Vuejs example (I am using Vue but believe it is not framework-related)

What package is effected by this issue?

@web3-onboard/core

Is this a build or a runtime issue?

Runtime

Package Version

2.21.0

Node Version

18.17.0

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Anything else?

Console showing wallet state changes. Logs 3 to 6 are recorded when I trigger the network change, showing that it does update but quickly reverts to the original state.

image

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.
@rueyce rueyce added the bug Something isn't working label Sep 11, 2023
@taylorjdawson
Copy link
Contributor

hey @rueyce we'll take a look at this!

@jeffywu
Copy link

jeffywu commented Feb 6, 2024

Hello, I'm also seeing this same issue with MetaMask. Perhaps this is an issue with injected wallets in general?

I am able to trigger an update consistently when switching from Mainnet => Arbitrum or between Arbitrum and Base, but it does not trigger when switching from Arbitrum => Mainnet or Arbitrum => Goerli

My version is: "@web3-onboard/core": "^2.21.2"

@rueyce
Copy link
Author

rueyce commented Feb 17, 2024

Update since the issue was opened by me: We're no longer encountering the issue described in the opening post. What happens now, for reference:

  • Doing onboard.setChain to a foreign chain when connected with a chain-limited wallet now gives an error, which is expected.
  • Switching to another different-chain wallet directly in the extension now disconnects it from the dApp. Importantly, it's no longer using nor displaying the wrong wallet and chain as previously described.

Thanks for looking at this and please feel free to close this or as you see fit.

Versions:

"@web3-onboard/core": "^2.21.2",
"@web3-onboard/injected-wallets": "^2.10.9",

Coin98 chrome extension version 9.1.6

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

6 participants