Skip to content

Wallets hooks

State hooks for wallet UI from @swapped/connect-sdk/react. Use event hooks for side effects (navigate, toast, analytics).

WalletsProvider is required for availability, connect, connections, active wallet, and balance hooks. Transfer plan / quote / submit / summary hooks work under SwappedConnectProvider alone — but you still need a connected walletId.

HookUse for
useAvailableWalletsAvailable wallets this device can connect — not the connected list
useConnectWalletOpen / disconnect a wallet; WalletConnect pairing URI
useWalletSame actions scoped to one provider (brand)
useWalletConnectionsAlready-connected instances (walletId) + restore / pairing + active wallet
useActiveWalletSelected walletId for UI (persisted)
useWalletBalances / useAllWalletBalancesTokens for one / every connected wallet
useWalletTransferPlanHow this token reaches the session (direct / swap / bridge)
usePrepareWalletTransferOptional prefetch of swap/bridge currency lists
useWalletTransferMinAmount / useDualAmountInputSource min + synced crypto/fiat fields
useWalletTransferQuoteQuote for a plan + amount
useWalletTransferUser confirms in the wallet (submit / retry)
useWalletCompletedTransactionSummarySuccess-screen data (provider-free)
Event hooksSide effects (useOnWalletTransferStatus)

Failures: Errors. Walkthrough: Example.