Function: formatBalance()
formatBalance(
balance
,decimals
,format
,showSign
):string
Formats a coin balance based on our standard coin display logic. If the balance is less than 1, it will be displayed in its full decimal form. For values greater than 1, it will be truncated to 3 decimal places.
Parameters
• balance: string
| number
| bigint
• decimals: number
• format: CoinFormat
= CoinFormat.Rounded
• showSign: boolean
= false
Returns
string