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

web3auth provider not changing chains when calling switchChain, but connectedChain does #2241

Open
1 task done
bengobeil opened this issue Jun 20, 2024 · 3 comments · May be fixed by #2249
Open
1 task done

web3auth provider not changing chains when calling switchChain, but connectedChain does #2241

bengobeil opened this issue Jun 20, 2024 · 3 comments · May be fixed by #2249
Assignees
Labels
bug Something isn't working

Comments

@bengobeil
Copy link
Contributor

Current Behavior

Hey @Adamj1232, it seems as though calling setChain on the useSetChain hook when connected to web3auth wallet does not update the provider in wallet on the useConnectWallet hook. I'm not familiar with the codebase enough to fix this, I've been taking a look at day and it seems as though web3auth is not integrate with the rx/js based state, not sure about this. Would it be possible to have your help on this?

Expected Behavior

I expect the wallet.provider on useConnectWallet to have changed it's chain Id so I can use the signer on the new connected chain.

Steps To Reproduce

Notice in the demo app, when changing chains, the native token symbol changes, but it seems the provider is still connected to the original chain.

What package is effected by this issue?

@web3-onboard/web3auth

Is this a build or a runtime issue?

Runtime

Package Version

latest

Node Version

No response

What browsers are you seeing the problem on?

Firefox

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.
@bengobeil bengobeil added the bug Something isn't working label Jun 20, 2024
@Adamj1232
Copy link
Member

@bengobeil there will probably need to be a patch made to the web3auth provider to ensure chain ID is passed properly - have a look at packages/coinbase/index for a starting point example. Web3Onboard is expecting the chainID in hex

@bengobeil bengobeil linked a pull request Jun 25, 2024 that will close this issue
20 tasks
@bengobeil
Copy link
Contributor Author

Hey @Adamj1232, opened a PR trying to solve this issue but no dice. #2249

Any help would be appreciated, thanks.

@bengobeil
Copy link
Contributor Author

Hey @Adamj1232, just checking in, would it be possible to take a look at this? Many thanks!

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

Successfully merging a pull request may close this issue.

2 participants