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
Show total balance in account selector #1468
Conversation
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
Codecov Report
@@ Coverage Diff @@
## master #1468 +/- ##
=======================================
Coverage 83.02% 83.02%
=======================================
Files 154 155 +1
Lines 4042 4048 +6
Branches 726 728 +2
=======================================
+ Hits 3356 3361 +5
- Misses 686 687 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Reviewed, LGTM.
One question, though.
As far as I can tell, currently when the API call fails, and we fall back to the gRPC, this is all done silently. So just by looking at the UI, there is no way to tell whether we are seeing the real total balance, or just the portion returned by the gRPC fallback.
I don't like that. I would prefer somehow flagging the accounts where we couldn't get the full balance, and adding a visual indicator (maybe a question mark?) to the UI in this case.
(But this can be done in a separate PR)
available: grpcBalance.available, | ||
delegations: null, | ||
debonding: null, | ||
total: null, |
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.
@csillag: As far as I can tell, currently when the API call fails, and we fall back to the gRPC, this is all done silently. So just by looking at the UI, there is no way to tell whether we are seeing the real total balance, or just the portion returned by the gRPC fallback.
This fallback returns null total, rather than available + 0 + 0
so the displayed balances shouldn't be misleading. But I noticed we don't differentiate loading and null. It just keeps loading
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.
Fixes #1110