Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: format amount with min one decimal #379

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

peterpeterparker
Copy link
Member

Motivation

While developing an E2E tests I noticed that actually the ICP ledger enforce one minimal decimal. Therefore I think it makes sense to align the formatter to their implementation.

Source

See convert_tokens_to_string_representation in https://github.com/dfinity/ic/blob/master/packages/icrc-ledger-types/src/icrc21/lib.rs#L577

Changes

  • Set min decimals to one

Copy link
Contributor

@AntonioVentilii AntonioVentilii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM tks!

@peterpeterparker peterpeterparker merged commit 7014d20 into main Dec 25, 2024
10 checks passed
@peterpeterparker peterpeterparker deleted the feat/format-amount-1-decimals branch December 25, 2024 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants