useWalletSettings
Hook to access and modify wallet configuration settings
Import
Usage
Return Type
Properties
displayedAssets
Array<{ contractAddress: string, chainId: number }>
Array of assets to display in the wallet interface. Each asset is defined by:
contractAddress
: The token contract addresschainId
: The network ID where the token exists
readOnlyNetworks
number[] | undefined
Array of network IDs where transactions are disabled. These networks are available for viewing balances and transaction history, but users cannot initiate new transactions.
setDisplayedAssets
(assets: Array<{ contractAddress: string, chainId: number }>) => void
Function to update the list of displayed assets. Takes an array of asset objects, each containing a contract address and chain ID.
Notes
This hook provides access to wallet display settings and network status information.
Key features:
- Asset display list management
- Read-only network status information
- Type-safe configuration updates
Common use cases:
- Managing visible token list
- Checking if networks are read-only
- Building settings interfaces
Best practices:
- Validate contract addresses before adding to displayed assets
- Check network read-only status before attempting transactions
- Keep displayed assets list up to date
The hook is commonly used in wallet configuration interfaces to manage which assets are displayed and check network status.
Was this page helpful?