-
Notifications
You must be signed in to change notification settings - Fork 94
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
Portfolio cards and Balance break down #358
Conversation
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.
Also, the 80 + ## + ## breakdown is nice, but also show the = total lockup as well as it currently does.
Design note, not sure we need the colors, but no strong preferences here. Reveal buttons style is not consistent with other buttons in the app
👍
app/pages/Account/functions.js
Outdated
try { | ||
const response = await ( | ||
await fetch( | ||
"https://api.coingecko.com/api/v3/simple/price?ids=handshake&vs_currencies=usd" |
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.
could this be a setting? usd/cad/eur etc
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.
Hm yeah, can do that 👍
Thanks for the feedback @RobertLowe!
It takes up space, might have to reduce the font size for everything (it's scrollable, but nice to have the whole breakdown in one view.) Will see if it fits.
The colors indicate how serious the operation is (has a time limit, some pending action, just notices of something happening). We could lighten them a bit more. I agree, black buttons are weird. Have any suggestions for them? |
Thanks for keeping on top of this @rithvikvibhu @rithvikvibhu @chikeichan I think all new features merging in should require tests, my face went a bit pale when I saw there were only 2 spec files in the entire application :S |
We do need tests, but like you said, the are only 2 of them (one of which is completely commented out). Maybe you could help start with those tests? |
6d6cf02
to
8f23488
Compare
@rithvikvibhu maybe in the future, I'm still learning |
@@ -446,6 +447,12 @@ class WalletService { | |||
await finalizeMany(wallet, names); | |||
}; | |||
|
|||
renewMany = async (names) => { |
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 blocking for this PR - now that we have ledger, we should add ledgerProxy
to all calls like this. We will need to separate renewMany
to createRenewMany
and sendRenewMany
for ledgerProxy
.
7e9412c
to
596ed88
Compare
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.
The main changes:
Now:
This was done mainly because the "In reveal" label may be confusing as only a part of it would be immediately recoverable. |
I don't see the Real 1 Bid / Renew / Redeem 1 bid, etc Would this be because I just don't have any? |
Yup, only actionable cards (with an exception of transfers, which stay until finalized) are shown. |
@RobertLowe thank you for reviewing our PR! please join our discord if you are interested for more discussion on bob - https://discord.gg/qtpmPCgrCB |
Supersedes and closes #329.
Balance
This replaces the single "Locked" balance with 3 numbers, shown only when applicable:
There's also a USD estimate based on coingecko's public API.
Cards
Below the balance section, a row of cards show actionable info that may or may not be time-constrained:
Just like locked balance blocks, irrelevant cards are hidden.
Since the information needs to be fetched from different places (and frequently! as it is on the main page), imo it made sense to make one pass over all bids and collect everything instead of calling
createRegisterAll
,createRedeemAll
, etc. which will go through the same loops multiple times, separately.Test
Either simply try out random actions (bids, reveals, transfers, etc.) or use this for reference (regest) - after starting at block 200, at block 228, all states are covered (except transfers).
Don't have a script to place these bids yet, will try to write one based on https://gist.github.com/pinheadmz/49e3fac7d797a99c3a78fb3ca0ddc012.
TODO
console.log()
statements before merging