mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
fix changing amount bitcoin unit on send tab with comma decimal separator
This commit is contained in:
parent
6a5060c0c8
commit
ad1ecfb887
1 changed files with 2 additions and 1 deletions
|
@ -287,7 +287,8 @@ public class PaymentController extends WalletFormController implements Initializ
|
|||
amountUnit.valueProperty().addListener((observable, oldValue, newValue) -> {
|
||||
Long value = getRecipientValueSats(oldValue);
|
||||
if(value != null) {
|
||||
DecimalFormat df = new DecimalFormat("#.#", DecimalFormatSymbols.getInstance(Locale.ENGLISH));
|
||||
UnitFormat unitFormat = Config.get().getUnitFormat() == null ? UnitFormat.DOT : Config.get().getUnitFormat();
|
||||
DecimalFormat df = new DecimalFormat("#.#", unitFormat.getDecimalFormatSymbols());
|
||||
df.setMaximumFractionDigits(8);
|
||||
amount.setText(df.format(newValue.getValue(value)));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue