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
When connected, switchChain will switch the target chain for the connector.
When not connected, switchChain will switch the target chain for the Wagmi Config.
In practice what seems to happen (especially when using switchChainAsync is that the function throws with SwitchChainNotSupportedError, since the connector.switchChain function is not defined yet.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The documentation for
useSwitchChain
states:In practice what seems to happen (especially when using
switchChainAsync
is that the function throws withSwitchChainNotSupportedError
, since theconnector.switchChain
function is not defined yet.Here's a reproduction.
To reproduce it:
Is this behaviour intended and consistent?
I see two options:
SwitchChainNotSupportedError
is misleading in this case)Beta Was this translation helpful? Give feedback.
All reactions