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

Reorganize & clean exchange-rate logic #5447

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

swansontec
Copy link
Contributor

@swansontec swansontec commented Feb 8, 2025

Pull request #5423 contained a bunch of logic errors, so clean everything up in a way that makes it less confusing and less buggy.

  • Break up long lines.
  • Fix misleading comments.
  • Give variables better names.
  • Don't copy data needlessly.
  • Stomp old cache entries instead of mutating them.
  • Only add the account fiat pair once, instead of in two separate places.
  • Expire cache entries once a load-time, instead of doing this in three separate places.
  • Do not store reverse rates in the cache, but derive them at the very end.
  • Move getYesterdayDateRoundDownHour into this file, since it's only used here.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Pull request #5423 contained a bunch of logic errors, so clean everything up in a way that makes it less confusing and less buggy.

- Break up long lines.
- Fix misleading comments.
- Give variables better names.
- Don't copy data needlessly.
- Stomp old cache entries instead of mutating them.
- Only add the account fiat pair once, instead of in two separate places.
- Expire cache entries once a load-time, instead of doing this in three separate places.
- Do not store reverse rates in the cache, but derive them at the very end.
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.

2 participants