Sepolia frontend changes to make sure stablecoin transactions are accurate displaying the prices #114
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.
Previously, users trying to obtain 10,000 stablecoins would see a value of 0 ETH, which is inaccurate. The issue stemmed from the parameters configured for the conversion function, particularly with the decimal points (
scDecimals, rcDecimals, and BC_decimals
).Sepolia showed a value of 0.000000000000000032 ETH(18 digits) due to incorrect BC_decimals being used (18), which, when displayed on the frontend, only showed 0.00000 ETH.
Introduced decimal_subtractor = 12 in sepolia.env to adjust the decimal precision correctly:
When BC_decimals is set to 18 in the conversion function but scDecimals = 6 is required, subtract decimal_subtractor from BC_decimals (18 - 12 = 6).
For Milkomeda network, set decimal_subtractor = 0:
This way, 18 - 0 = 18 decimal points remain unchanged, ensuring that Milkomeda continues working as before.
Resolves #113