-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix: fix usd amount in swap notifications #25444
fix: fix usd amount in swap notifications #25444
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
const amountInEther = calcTokenAmount( | ||
amount, | ||
parseFloat(decimals), | ||
).toNumber(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only concern is how this is a different method compared to portfolio.
In portfolio we are using Ethers+BigNumber.js so little conversion loss.
But extension may have some formatting.
... we can deal with this in the future lolol
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #25444 +/- ##
===========================================
+ Coverage 64.95% 64.96% +0.01%
===========================================
Files 1385 1385
Lines 54925 54925
Branches 14408 14408
===========================================
+ Hits 35673 35678 +5
+ Misses 19252 19247 -5 ☔ View full report in Codecov by Sentry. |
Builds ready [7797d88]
Page Load Metrics (222 ± 252 ms)
Bundle size diffs
|
Description
This PR fixes the fiat (USD) conversion for the values displayed in the Swap notifications.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist