Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Hook for managing the currently selected wallet
useWalletState
import { useWalletState } from "@getpara/react-sdk";
function WalletSelector() { const { selectedWallet, setSelectedWallet, updateSelectedWallet } = useWalletState(); const { data: account } = useAccount(); const handleWalletChange = (walletId: string, walletType: TWalletType) => { setSelectedWallet({ id: walletId, type: walletType }); }; return ( <div> <p>Current Wallet ID: {selectedWallet.id || "None"}</p> <p>Current Wallet Type: {selectedWallet.type || "None"}</p> {account?.wallets.map((wallet) => ( <button key={wallet.id} onClick={() => handleWalletChange(wallet.id, wallet.type)} style={{ fontWeight: selectedWallet.id === wallet.id ? "bold" : "normal" }} > Select {wallet.type} Wallet </button> ))} </div> ); }