Use exact decimal arithmetic for payments, fees, quotes, and limits - #171
Open
nwosum113-ui wants to merge 4 commits into
Open
Use exact decimal arithmetic for payments, fees, quotes, and limits #171nwosum113-ui wants to merge 4 commits into
nwosum113-ui wants to merge 4 commits into
Conversation
…metic-for-financial-calculations Use exact decimal arithmetic for payments and fees
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Gozirimdev
requested changes
Aug 20, 2026
Contributor
There was a problem hiding this comment.
The decimal work is moving in the right direction, but we still need:
- Preserve exchange rates as decimals before JSON parsing can turn them into JavaScript numbers.
- Keep compliance totals separated by asset/currency and apply limits in a clearly defined currency.
- Support configured fiat currencies instead of a hard-coded list.
- Add a safe audit/reconciliation step for existing values.
- Add tests for mixed assets, rounding boundaries, large values, API output, and reconciliation.
Please finish these items before we merge.
…-arithmetic-for-payments Use exact decimal math for financial calculations
Gozirimdev
requested changes
Aug 22, 2026
Gozirimdev
left a comment
Contributor
There was a problem hiding this comment.
This PR now conflicts with main and duplicates the decimal implementation already merged in #172. Please close this duplicate PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement exact decimal arithmetic for financial calculations to ensure precision and avoid floating-point errors in payments.
Changes
Impact
closes #154