You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using SwitchNetwork exactly as it is shown in your docs...
await wallet.SwitchNetwork(chainId);
Im seeing some odd behaviour depending on how I connect to the wallet using the ThirdwebManager and WalletConnectWallet.
If I connect to a wallet using the QR code option and scan from a second device the connection happens as expected and SwitchNetwork works as expected as many times as I try it. It switches network in the wallet on the other device and the SwitchNetwork call completes as expected in my app once the network is switched.
If I connect using a wallet on the same device that my app is running on the connection happens as expected but when I call SwitchNetwork there is a problem. The wallet does switch network as expected but the SwitchNetwork call doesn't complete, it seems to just sit forever waiting for a response.
I have tried this on both Android and iOS using multiple networks and wallets and it always fails.
I was using an older SDK but I have updated to the latest one (v5.18.1) and the problem remains.
I've also tried this in a brand new Unity project that does nothing but a connect and switch and the problem still remains.
Edit: This first instance is true if the wallet app connected to via QR code doesn't also exist on the device with my app. If the wallet app does exist it connects on the 2nd device as expected. When SwitchNetwork is called it switches the network in the wallet on the 2nd device as expected but also launches the wallet on the device running my app and I assume tries to do it there as well. Which results in the same problem occurring, the call to SwitchNetwork waits forever for a response.
The text was updated successfully, but these errors were encountered:
I'm using SwitchNetwork exactly as it is shown in your docs...
await wallet.SwitchNetwork(chainId);
Im seeing some odd behaviour depending on how I connect to the wallet using the ThirdwebManager and WalletConnectWallet.
If I connect to a wallet using the QR code option and scan from a second device the connection happens as expected and SwitchNetwork works as expected as many times as I try it. It switches network in the wallet on the other device and the SwitchNetwork call completes as expected in my app once the network is switched.
If I connect using a wallet on the same device that my app is running on the connection happens as expected but when I call SwitchNetwork there is a problem. The wallet does switch network as expected but the SwitchNetwork call doesn't complete, it seems to just sit forever waiting for a response.
I have tried this on both Android and iOS using multiple networks and wallets and it always fails.
I was using an older SDK but I have updated to the latest one (v5.18.1) and the problem remains.
I've also tried this in a brand new Unity project that does nothing but a connect and switch and the problem still remains.
Edit: This first instance is true if the wallet app connected to via QR code doesn't also exist on the device with my app. If the wallet app does exist it connects on the 2nd device as expected. When SwitchNetwork is called it switches the network in the wallet on the 2nd device as expected but also launches the wallet on the device running my app and I assume tries to do it there as well. Which results in the same problem occurring, the call to SwitchNetwork waits forever for a response.
The text was updated successfully, but these errors were encountered: