-
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
backend: show estimated conversions for unconfirmed ETH txs and remove skeleton when conversions are missing. #3235
Conversation
c0ae07d
to
23d80b8
Compare
d41de3b
to
382b229
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.
Please, add some info in the commit messages about why the changes are required 😇
)} | ||
<span className={styles.txUnit}>{' '}{conversionUnit}</span> | ||
) : null } | ||
{ (conversion || sendToSelf) ? <span className={styles.txUnit}>{' '}{conversionUnit}</span> : 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.
I think that we can move this inside the previous statement, wdyt?
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 I follow, the logic for the if
is slightly different here than from anywhere else. can you clarify what you mean please? :)
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.
Yes that is different, but if we decide that instead of showing the skeleton we want to hide the whole line (doesn't make sense to me to hide only the fiat conversion and show the unit), I think that the logic used to decide when showing the unit should be the same of the amount, and hence we don't need separate if statements.
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.
Ok I think I understood, LMK if it seems ok now :)
Unconfirmed ETH transactions do not have a timestamp associated (while for BTC we store the created timestamp in the DB). So instead we use estimated conversions.
81e4805
to
8f0c2e4
Compare
The skeleton is meant to represent that we are waiting for a backend response. In this case the conversion is not available becase the data is missing.
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.
tACK! 🙏
ETH transactions do not have a "Created" timestamp we can't provide an estimated conversion based on that. We use real-time conversion instead.
We also remove the skeleton for the cases in which a conversion is still not available:

Before asking for reviews, here is a check list of the most common things you might need to consider: