Learn how to configure and display balances in the Para Modal, including Aggregated and Custom Token modes, and use the useProfileBalance hook for programmatic access.
useProfileBalance
hook.
paraModalConfig.balances
property in your ParaProvider
configuration. This setting will impact both the Para Modal’s balance display and instances where you use the useProfileBalance
hook.
Para supports two primary balance display modes, AGGREGATED
and CUSTOM_ASSET
.
name
, symbol
, and logoUrl
(optional).implementations
array for each network you wish to query for balances.
price
object with the asset’s price in the format { value: number; currency: 'USD' }
.priceUrl
string. This endpoint must respond to GET requests with a JSON object with the asset’s current price in the format { value: number; currency: 'USD' }
.network
object specifying the network’s name
, evmChainId
, and an rpcUrl
where asset balances can be queried.contractAddress
string.network
string, matching one of the networks enumerated in the TNetwork
type. For example, 'ETHEREUM'
or 'SOLANA'
.contractAddress
string.excludeStandardAssets
to true
.useProfileBalance
hook allows you to query the current aggregated or custom token balance of all wallets in the current session.
Balances are normally cached on the server for five minutes. You can supply a refetchTrigger
to the hook to manually refetch balances when desired, using a unique number or string.
ProfileBalance
object returned by useProfileBalance
has the following structure: