formatAmount
The formatAmount
utility is designed for consistent number formatting.
Usage
code
import { formatAmount } from '@coinbase/onchainkit/token';
const amount = formatAmount('10000', { minimumFractionDigits: 2 });
Returns
string
- The formatted amount.