web3-onboard icon indicating copy to clipboard operation
web3-onboard copied to clipboard

[Bug]: Wallet provider not updating correctly when network is changed

Open chiuzon opened this issue 4 years ago • 6 comments

Current Behavior

Wallet provider isn't updated correctly after the network is changed to the correct network.

Expected Behavior

Wallet provider should change when new network is selected instead of changing when the network select process begins.

Steps To Reproduce

  1. Create default Onboard() object with network set to 1
  2. Connect to network (walletSelect(), walletCheck())
  3. walletReset()
  4. onBoard.config({networkId: 4});
  5. Connect to network (walletSelect(), walletCheck())

Onboard Version

1.37.2

Node Version

14

What browsers are you seeing the problem on?

Firefox

Relevant log output

No response

Anything else?

No response

chiuzon avatar Jan 31 '22 08:01 chiuzon

@chiuzon Which wallet are you using? And what do you mean by "Wallet provider should change"?

taylorjdawson avatar Feb 06 '22 23:02 taylorjdawson

Hey @taylorjdawson, it seems that when we change the chain from Frame wallet, it behaves differently than with other wallets supported by Blocknative, such as Metamask. When I change the network from Metamask, my React components get updated but this is not the case with Frame as nothing happens. Any ideas? Thanks

greedythib avatar Feb 16 '22 16:02 greedythib

@greedythib This seems like a separate issue? Is this the issue with the network value returned from the network callback? Could you explain by what is not updated when using Frame? The only "updates" we post are via those subscription callbacks.

taylorjdawson avatar Feb 25 '22 16:02 taylorjdawson

Some users are reporting a similar issue with the 1inch mobile wallet. When changing networks on the app (eg Ethereum to Polygon) it doesn't trigger the subscriptions network callback so it makes it impossible to do any transactions because onboardjs doesn't detect the mobile wallet network change.

...
subscriptions: {
  network: (connectedNetworkId) => {
   // this doesn't get trigged on network change on certain wallets
  }
}

Is there something we do on our end with bnc-onboard v1 to fix this issue or is this a bug with the 1inch wallet? thanks

miguelmota avatar Apr 26 '22 01:04 miguelmota

@miguelmota is this still an issue you are experiencing? Our current recommendation would be to upgrade to the latest version of web3-onboard that has active development teams working on features, enhancements and bugs

Adamj1232 avatar Jun 28 '22 20:06 Adamj1232

Closing this issue as I have been unable to contact. Please reopen if the issue persists

Adamj1232 avatar Jul 05 '22 17:07 Adamj1232