From 9b43429de9984dc8e1f0af23fa137f26e8581180 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Fri, 10 Jul 2020 18:35:17 +0200 Subject: [PATCH] use static formatter --- .../java/com/sparrowwallet/sparrow/control/FiatLabel.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/FiatLabel.java b/src/main/java/com/sparrowwallet/sparrow/control/FiatLabel.java index dc070815..61dde11f 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/FiatLabel.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/FiatLabel.java @@ -87,9 +87,8 @@ public class FiatLabel extends CopyableLabel { BigDecimal btcBalance = satsBalance.divide(BigDecimal.valueOf(Transaction.SATOSHIS_PER_BITCOIN)); BigDecimal fiatBalance = btcBalance.multiply(BigDecimal.valueOf(getBtcRate())); - DecimalFormat currencyFormat = new DecimalFormat("#,##0.00"); - String label = getCurrency().getSymbol() + " " + currencyFormat.format(fiatBalance.doubleValue()); - tooltip.setText("1 BTC = " + getCurrency().getSymbol() + " " + currencyFormat.format(getBtcRate())); + String label = getCurrency().getSymbol() + " " + CURRENCY_FORMAT.format(fiatBalance.doubleValue()); + tooltip.setText("1 BTC = " + getCurrency().getSymbol() + " " + CURRENCY_FORMAT.format(getBtcRate())); setText(label); setTooltip(tooltip);