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

Using switchNetwork causes the currently-connected wallet to disconnect #1125

Open
JayWelsh opened this issue Jul 10, 2023 · 2 comments
Open
Labels
bug Something isn't working

Comments

@JayWelsh
Copy link
Contributor

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

  1. Navigate to the switchNetwork documentation at: https://usedapp-docs.netlify.app/docs/Guides/Transactions/Switching%20Networks
  2. Use any of the demo switch network buttons under the "example" section
  3. 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

  • useDapp version: v1.2.10
  • Package manager: yarn
  • Node version: v16.14.2

Additional context

switch-network-disconnect.mp4
@JayWelsh JayWelsh added the bug Something isn't working label Jul 10, 2023
@mattw09
Copy link

mattw09 commented Oct 12, 2023

hey @JayWelsh have you tried using the noMetamaskDeactivate - seems to help with this bug that sounds similar to yours

@JayWelsh
Copy link
Contributor Author

hey @JayWelsh have you tried using the noMetamaskDeactivate - seems to help with this bug that sounds similar to yours

Thanks for the suggestion, I gave this a shot, but it unfortunately doesn't change the behavior experienced in my report

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

No branches or pull requests

2 participants