Switch between Para wallets to perform operations on different networks or addresses. This guide works in tandem with the Get All Wallets and Get Wallet Addresses guides, providing a comprehensive overview of wallet management in the Para ecosystem.

Core Hook

To switch wallets, use the useWalletState hook. This hook provides methods to manage the currently selected wallet and allows you to switch between different wallets.

useWalletState

import { useWalletState } from '@getpara/react-sdk';

const { selectedWallet, setSelectedWallet, updateSelectedWallet } = useWalletState();

// Switch to a specific wallet by ID
setSelectedWallet({ id: 'wallet_123' });

// Switch by both ID and type
setSelectedWallet({ id: 'wallet_456', type: 'EVM' });

// Access current selection
console.log(selectedWallet.id); // 'wallet_456' or undefined
console.log(selectedWallet.type); // 'EVM' or undefined

// Refresh selection from Para client state
updateSelectedWallet();

Types

These types are used in the useWalletState hook to manage wallet selection.

SelectedWallet Type

TWalletType

Next Steps