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

Fix incorrect rounding of BSQ dollar price to whole number #3953

Merged
merged 2 commits into from
Feb 11, 2020

Conversation

stejbac
Copy link
Contributor

@stejbac stejbac commented Feb 9, 2020

Add a new method to DisplayUtils to restore the old rounding behaviour of formatVolumeWithCode whenever a fractional volume is required. This fixes a regression caused by #3926 to remove unnecessarily displayed decimals for fiat volumes - it appears that in every case but the average dollar price on the BSQ dashboard a whole number should be shown.

Without this fix, the 30/90 day average price on the BSQ dashboard displays:

1 BSQ = 1 USD

(I believe the issue needs to be fixed in the 1.2.6 release branch as well.)

Add a new method to DisplayUtils to restore the old rounding behaviour
of formatVolumeWithCode whenever a fractional volume is required. This
fixes a regression caused by bisq-network#3926 to remove unnecessarily displayed
decimals for fiat volumes - it appears that in every case but the avg.
dollar price on the BSQ dashboard a whole number should be shown.

Also add a relevant test.
@ripcurlx ripcurlx added this to the v1.2.6 milestone Feb 11, 2020
Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

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

ACK

Thanks for catching this one! I'll cherry-pick after the merge into our release branch.
Tested it on Mainnet and everything seems to be correct now.

@ripcurlx ripcurlx merged commit f400298 into bisq-network:master Feb 11, 2020
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