Defaults decimals to 10.
Note: Uses parseFloat — extremely large mantissas may lose precision; prefer retaining raw ledger strings when auditing funds.
Setup
import { formatFeeAmount } from '@fairmint/canton-node-sdk';
Minimal example
const readable = formatFeeAmount('12.34567890123456789', 6);
console.log(readable);
Parameters
amount— Fee decimal string.decimals(optional) —toFixedprecision (default10).
Returns
string.