useDApp
useDApp copied to clipboard
Using `switchNetwork` causes the currently-connected wallet to disconnect
Describe the bug
The switchNetwork function should prompt a connected wallet to switch to the target network, but it shouldn't cause the connected wallet to disconnect from the web frontend after successfully changing networks.
To Reproduce
- Navigate to the
switchNetworkdocumentation at: https://usedapp-docs.netlify.app/docs/Guides/Transactions/Switching%20Networks - Use any of the demo switch network buttons under the "example" section
- The vast majority of the time, a network switch will cause the connected wallet to disconnect and you will see that the switch network buttons disappear and become just a "connect" button. Very occasionally a disconnect won't occur.
Software versions
useDappversion: v1.2.10- Package manager: yarn
- Node version: v16.14.2
Additional context
https://github.com/TrueFiEng/useDApp/assets/14224459/15bd53b2-ec45-4f43-9393-a6fa8b147461