-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update GUI labels to reflect multiple rate providers #4406
Merged
sqrrm
merged 9 commits into
bisq-network:master
from
cd2357:xchange-integration-gui-label-adjustments
Aug 20, 2020
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b8a76b0
Update top-right bar references to price source
cd2357 189431e
Correctly map lastRequest timestamp
cd2357 2a4c11c
Remove unused methods
cd2357 f73f417
Rename method
cd2357 584e516
Rename timestamp field
cd2357 f534939
Update labels to indicate Bisq Price Index
cd2357 2ddb2c2
Update top-right tooltip timestamp
cd2357 ef5b804
Update exchange rate info in About view
cd2357 cdc6242
Update core/src/main/resources/i18n/displayStrings.properties
cd2357 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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
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
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hold on a second, this isn't just changing labels, you're actually changing code here. It looks like you're replacing the timestamp of the actual price data, with the timestamp Bisq updated it from the Pricenode, which is incorrect. This behavior needs to be preserved, for example if a pricenode has an issue and doesn't get data updates, the local Bisq node needs to be able to detect that it's old data and switch to a different Pricenode with recently updated data.
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.
Since there is no more BA provider, the
btcAverageTs
field is basically useless.It is however used here to populate the
epochInMillisAtLastRequest
timestamp -- which is used in the UI to show when the fiat rates were retrieved.Before, when using BA: this made sense, cause BA was the "single source of truth" for all fiat rates, and Poloniex was the source of alt rates.
Now, when using multiple providers: basically the pricenode itself is the "provider", because it aggregates rates from multiple sources for both fiat and alts.
So, the closest "timestamp" that shows the last time the "provider" (pricenode) was polled, is the one in the code snippet above.
Alternative would be to extract and index every timestamp per exchange rate, then selectively show the right one depending on what currency pair the user selected in the UI. That seems like overkill for what this change tries to achieve. Especially since those "per exchange rate" timestamps are very likely the same, cause they all show the point in time when the avg rate was calculated, and they're all calculated when the pricenode is polled (the avg is freshly calculated based on newest data).
So I would say, this is the simplest and most pragmatic approach (
epochInMillisAtLastRequest
=timestamp_when_pricenode_last_successfully_queried
).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 timestamp is not for when the data was updated from the pricenode, that's irrelevant. The timestamp is for the price itself, i.e. when the price was obtained from the provider, or in the case of a weighted average aka index, the time when the index was last updated. Can you please use the
timestampSec
field for each asset's index?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.
Done. This field now just stores the "pricenode query timestamp", but the
timestampSec
of each asset is shown in the tooltip (see PR screenshots).