sodax-wallet-sdk-react-switch-chain

Installation
SKILL.md

Switch chain (wallet-sdk-react granular skill)

Granular skill for useEvmSwitchChain — EVM wrong-network detection + switching. EVM-only. Source-of-truth reference lives in the parent broad skill's knowledge tree; this file is the focused workflow only.

Step 1 — Clarify with user before coding

  1. New code or v1 → v2 port? New → § Integration. Port v1 → § Migration.
  2. Target chain is EVM? This hook only covers EVM networks (and the Injective + MetaMask Ethereum-mainnet auto-switch). Non-EVM chains have no switch concept.
  3. Gate a signed action? Typical flow: const { isWrongChain, handleSwitchChain } = useEvmSwitchChain({ xChainId }); block the action and show a switch CTA while isWrongChain.

Integration workflow (new v2 code)

  1. ../integration/knowledge/ai-rules.md — DO / DON'T (read first).
  2. ../integration/knowledge/recipes/setup.md — prerequisite: provider mounted with the EVM slot.
  3. ../integration/knowledge/recipes/switch-chain.md — the full wrong-network → switch pattern.
  4. Lookups → ../integration/knowledge/reference/hooks.md (EVM-specific section).

Switch-chain-specific anti-patterns

Installs
1
First Seen
Jun 10, 2026
sodax-wallet-sdk-react-switch-chain — icon-project/sodax-sdks