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(PreciseAmountRounding) - format precise numbers with 6 significant digits #2639

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

nudded
Copy link
Contributor

@nudded nudded commented Sep 30, 2024

Description

To calculate the unit price of a fee linked to a dynamic charge, we do: total_amount / units = unit_price. This value can be really long.

Solution

We’ll introduce the notion of significant digits for fee unit price: We hide values if they are not significant (0).

@nudded nudded force-pushed the feat-round-unit-price-significant-decimals branch from b136f32 to 03258b0 Compare September 30, 2024 13:37
@nudded nudded force-pushed the feat-round-unit-price-significant-decimals branch from 03258b0 to f168da2 Compare September 30, 2024 13:44
@nudded nudded merged commit 149234f into main Oct 1, 2024
6 checks passed
@nudded nudded deleted the feat-round-unit-price-significant-decimals branch October 1, 2024 07:54
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