-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize & clean exchange-rate logic
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.
- Loading branch information
1 parent
b4e2393
commit d47fe40
Showing
2 changed files
with
130 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters