Skip to content

@swapped/connect-sdk / react / UseAllWalletBalancesResult

Type Alias: UseAllWalletBalancesResult

UseAllWalletBalancesResult = object

Defined in: src/react/wallets/hooks/useWalletBalances.ts:34

Properties

balances

balances: WalletBalancesForWallet[]

Defined in: src/react/wallets/hooks/useWalletBalances.ts:35


error

error: Error | null

Defined in: src/react/wallets/hooks/useWalletBalances.ts:52


isFetchingRates

isFetchingRates: boolean

Defined in: src/react/wallets/hooks/useWalletBalances.ts:51

True while fiat quotes are in flight for the latest fetch. Prefer isLoading / isRefetching for gating UI; this is for finer status.


isLoading

isLoading: boolean

Defined in: src/react/wallets/hooks/useWalletBalances.ts:41

True until balances are ready with exchange rates (initial load). Stays true across the quotes enrichment phase — do not treat balances as complete while this is true.


isRefetching

isRefetching: boolean

Defined in: src/react/wallets/hooks/useWalletBalances.ts:46

True during refetch() until balances with exchange rates are ready. Previous rated balances stay on screen while this is true.


refetch

refetch: () => Promise<void>

Defined in: src/react/wallets/hooks/useWalletBalances.ts:53

Returns

Promise<void>


refetchForWallet

refetchForWallet: (walletId) => Promise<WalletBalance[]>

Defined in: src/react/wallets/hooks/useWalletBalances.ts:58

Refresh one wallet instance (all namespaces / networks) in a single balances request. Pass any walletId from that instance.

Parameters

walletId

WalletId

Returns

Promise<WalletBalance[]>