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 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.)

stejbac added 2 commits Feb 8, 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 avg.
dollar price on the BSQ dashboard a whole number should be shown.

Also add a relevant test.
@stejbac stejbac mentioned this pull request Feb 10, 2020
@ripcurlx ripcurlx added this to the v1.2.6 milestone Feb 11, 2020
Copy link
Member

ripcurlx left a comment

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
4 checks passed
4 checks passed
greeting
Details
label
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ripcurlx ripcurlx mentioned this pull request Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.