Skip to content
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

Merged
merged 2 commits into from
Mar 24, 2025

Conversation

bznein
Copy link
Collaborator

@bznein bznein commented Mar 12, 2025

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:
image

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

  • updating the Changelog
  • writing unit tests
  • checking if your changes affect other coins or tokens in unintended ways
  • testing on multiple environments (Qt, Android, ...)
  • having an AI review your changes

@bznein bznein requested a review from Beerosagos March 12, 2025 09:56
@bznein bznein force-pushed the amount branch 2 times, most recently from c0ae07d to 23d80b8 Compare March 12, 2025 10:52
@bznein bznein changed the title backend: show estimated conversions for unconfirmed ETH txs. backend: show estimated conversions for unconfirmed ETH txs and remove skeleton when conversions are missing. Mar 12, 2025
@bznein bznein force-pushed the amount branch 3 times, most recently from d41de3b to 382b229 Compare March 13, 2025 10:41
Copy link
Collaborator

@Beerosagos Beerosagos left a 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 }
Copy link
Collaborator

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?

Copy link
Collaborator Author

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? :)

Copy link
Collaborator

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.

Copy link
Collaborator Author

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.
@bznein bznein force-pushed the amount branch 2 times, most recently from 81e4805 to 8f0c2e4 Compare March 18, 2025 15:29
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.
Copy link
Collaborator

@Beerosagos Beerosagos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK! 🙏

@bznein bznein merged commit ce95522 into BitBoxSwiss:master Mar 24, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants