Skip to content

@swapped/connect-sdk / react / UseAllWalletBalancesResult

Type Alias: UseAllWalletBalancesResult

UseAllWalletBalancesResult = object

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

Properties

balances

balances: WalletBalancesForWallet[]

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


error

error: Error | null

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


isFetchingRates

isFetchingRates: boolean

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

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:45

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:50

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:57

Returns

Promise<void>


refetchForWallet

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

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

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

Parameters

walletId

WalletId

Returns

Promise<WalletBalance[]>