Skip to content

refactor formatAmount #589

@yuetloo

Description

@yuetloo

Need to refactor formatAmount https://github.com/clrfund/monorepo/blob/develop/vue-app/src/utils/amounts.ts#L4 by breaking it down into different functions to handle separately input as string, FixedNumber, BigNumber, max decimal and significant digits.

  • need to remove the code that could convert big number to unsafe javascript number.
  • various places also call this function with hardcoded token decimal of 18

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions