This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
bug: WalletConnectConnector throws uncaught error on switchNetwork init failure #188
Closed
1 task done
Labels
Is there an existing issue for this?
Current Behavior
With slingshot mobile wallet (that does not support the test network I'm trying to switch to), the following error occurs on
useSwitchNetwork(...).switch
construction:Throw source: https://github.com/wagmi-dev/references/blob/main/packages/connectors/src/walletConnect.ts#L254
Expected Behavior
The error should be handled internally by wagmi, and result in setting
useSwitchNetwork(...).isError
totrue
, anduseSwitchNetwork(...).error
to a useful error.Steps To Reproduce
useSwitchNetwork
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
In general, wagmi should consider hiring a plucky intern (perhaps from Waterloo to work on testing and bugfixing the matrix of (all popular wallets) x (wallet-specific error cases).
Of course, mobile wallet support is very important as we move into this next phase of growing crypto to global ubiquity.
Popular mobile wallets include
Wallet-specific error cases for the intern to cover include
The text was updated successfully, but these errors were encountered: