Skip to content

Commit

Permalink
Update FilecoinNumber comments
Browse files Browse the repository at this point in the history
  • Loading branch information
navFooh committed Aug 14, 2023
1 parent 019f055 commit 838b34b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/filecoin-number/src/FilecoinNumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ export enum CoinType {
TEST = 't'
}

/**
* @param options.truncate Whether to truncate the address with K, M, B and T units, defaults to `true`. Disabled when `options.decimals` is `null`
* @param options.decimals How many decimals to display, `null` disables rounding, defaults to `3`
* @param options.padZeros Whether add trailing zeros to the end of the string, defaults to `false`
* @param options.addUnit Whether to display the unit, defaults to `true`
* @param options.prefix The prefix to prepend to the formatted string
*/
export interface FilecoinFormatOptions {
truncate?: boolean
decimals?: number | null
Expand Down Expand Up @@ -156,10 +163,6 @@ export class FilecoinNumber extends BigNumber {

/**
* Expresses this FilecoinNumber as a balance string
* @param options.truncate Whether to truncate the address with K, M, B and T units, defaults to `true`. Disabled when `options.decimals` is `null`
* @param options.decimals How many decimals to display, `null` disables rounding, defaults to `3`
* @param options.padZeros Whether add trailing zeros to the end of the string, defaults to `false`
* @param options.addUnit Whether to display the unit, defaults to `true`
*/
formatBalance(options?: FilecoinFormatOptions): string {
const truncate = options?.truncate ?? true
Expand Down

0 comments on commit 838b34b

Please sign in to comment.