-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: aggregated balance calculation #10404
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. |
i think we need the same fix here , my suggestion is :
|
Bitrise✅✅✅ Commit hash: 8601ed6 Note
|
Thanks for the fix! 🙏 test.mov |
hey @sahar-fehri , because the aggregated balance is only implemented on mobile for now |
We need to add tests for this. |
Should be there already, it's fixed for the erc20 token calculation too. |
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.
Not sure how DS was tagged to review this, as it does not touch DS
Bitrise✅✅✅ Commit hash: ea93248 Note
|
#10251 changed how accounts are represented. updated this PR to mock differently |
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.
Approving with a couple comments out of curiosity ✅
Bitrise✅✅✅ Commit hash: 8936ed4 Note
|
Quality Gate passedIssues Measures |
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.
LGTM
Description
Fixes the calculation for how much the aggregated balance changed in the last 1 day.
The fiat price 1 day ago was calculated incorrectly. For example it would calculate:
But this is backwards. If the price went down 6% in the last 24 hours, you would have had more fiat $ in the past, not less. This broke further calculations.
Related issues
#10406
Manual testing steps
Screenshots/Recordings
Before
Simplest case: a wallet with just eth. The aggregated balance should match ETH since it's the only token:
After
Matches extension now:
Pre-merge author checklist
Pre-merge reviewer checklist