Appearance
@swapped/connect-sdk / format / FormatCurrencyAmountOptions
Type Alias: FormatCurrencyAmountOptions
FormatCurrencyAmountOptions =
object
Defined in: src/format/formatCurrencyAmount.ts:5
Properties
decimals?
optionaldecimals?:number
Defined in: src/format/formatCurrencyAmount.ts:17
Decimal places. Defaults to fiatDecimals (2 when unset). Per-call value wins over getFormatDefaults.
firstNonZeroDecimal?
optionalfirstNonZeroDecimal?:boolean
Defined in: src/format/formatCurrencyAmount.ts:12
Expand past the currency decimal floor (default 2) until the first non-zero digit is visible (e.g. 0.0001 instead of 0.00).
format?
optionalformat?:"js-number"|"pretty"
Defined in: src/format/formatCurrencyAmount.ts:23
Output style:
'pretty'(default) — thousand separators'js-number'— no separators
removeTrailingZeros?
optionalremoveTrailingZeros?:boolean
Defined in: src/format/formatCurrencyAmount.ts:7
Strip trailing zeros after the decimal (e.g. 1.50 → 1.5).