UserWallet.balance() method
Fetch the native or ERC20 token balance of this wallet
Example
// native currency balance
const balance = await sdk.wallet.balance();
// ERC20 token balance
const erc20balance = await sdk.wallet.balance(tokenContractAddress);
Signature:
balance(currencyAddress?: string): Promise<CurrencyValue>;
Parameters
Parameter | Type | Description |
---|---|---|
currencyAddress | string | (Optional) |
Returns:
Promise<CurrencyValue>