ConnectedWallet
object from the wallets
array.switchChain
method. As a parameter to the method, pass the chain ID for your desired network as a number
or hexadecimal string
:switchChain
will update the network of the embedded wallet behind the scenes. For external wallets, switchChain
will prompt the user to switch to the target network within the external wallet’s client (e.g. their browser extension or mobile app).switchChain
returns a Promise that resolves to void
once the wallet has successfully been switched to the target network. The Promise will reject with an error if: