mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Increase price precision in Offer Book chart (altcoins)
In the Offer Book Chart, altcoins were displayed with prices having only 3 decimal places of precision. This resulted in not being able to see any meaningful prices across the x-axis because they were all the same, e.g. ETH=0.025 Instead it should show 8 digits of precision for altcoins. So for example ETH=0.02456914 Change the rule from if price begins 0.000 then display higher precision, to if price begins 0.0 then display higher precision. Fixes #4251
This commit is contained in:
parent
04872e03ee
commit
37331cde31
1 changed files with 1 additions and 1 deletions
|
@ -226,7 +226,7 @@ public class OfferBookChartView extends ActivatableViewAndModel<VBox, OfferBookC
|
|||
final double doubleValue = (double) object;
|
||||
if (CurrencyUtil.isCryptoCurrency(model.getCurrencyCode())) {
|
||||
final String withCryptoPrecision = FormattingUtils.formatRoundedDoubleWithPrecision(doubleValue, cryptoPrecision);
|
||||
if (withCryptoPrecision.equals("0.000")) {
|
||||
if (withCryptoPrecision.substring(0,3).equals("0.0")) {
|
||||
cryptoPrecision = 8;
|
||||
return FormattingUtils.formatRoundedDoubleWithPrecision(doubleValue, cryptoPrecision);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue