-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
[y] I have checked for duplicate issues
Description:
Conversion functions for USD equivalents use native JS parseFloat and multipliers like 1e6. This causes rounding errors for large currency amounts.
How to Reproduce:
Call calculateBcUsdEquivalent with a very large amountFloat (e.g., 10^18 wei equivalent).
Actual Behaviour:
Resulting values lose precision after the 15th significant digit, which is unacceptable for financial software.
Expected Behaviour:
All currency calculations must stay within BigInt or a dedicated library like bignumber.js until the final display stage.
Location: StablePay/djed-sdk/src/helpers.js
[y] I want to work on this issue
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels