[Bug]: Wallet provider not updating correctly when network is changed
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
- Create default Onboard() object with network set to 1
- Connect to network (walletSelect(), walletCheck())
- walletReset()
- onBoard.config({networkId: 4});
- 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 Which wallet are you using? And what do you mean by "Wallet provider should change"?
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 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.
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 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
Closing this issue as I have been unable to contact. Please reopen if the issue persists