Skip to content

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

@JayWelsh

Description

@JayWelsh

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

Metadata

Metadata

Assignees

No one assigned

    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