Skip to content

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

Open
@bengobeil

Description

@bengobeil

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions