From 4cdffec060057dc743bd970b56692dcc3a468b12 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 1 Sep 2020 13:13:38 +0200 Subject: [PATCH] fix fiat amount update on transaction update --- .../java/com/sparrowwallet/sparrow/control/WelcomeDialog.java | 2 ++ .../java/com/sparrowwallet/sparrow/wallet/SendController.java | 1 + 2 files changed, 3 insertions(+) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/WelcomeDialog.java b/src/main/java/com/sparrowwallet/sparrow/control/WelcomeDialog.java index 49d181a3..65a17fe7 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/WelcomeDialog.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/WelcomeDialog.java @@ -90,6 +90,8 @@ public class WelcomeDialog extends Dialog { private ToggleSwitch createToggle(StatusBar statusBar, ButtonType onlineButtonType, ButtonType offlineButtonType) { ToggleSwitch toggleSwitch = new UnlabeledToggleSwitch(); + toggleSwitch.setStyle("-fx-padding: 1px 0 0 0"); + toggleSwitch.selectedProperty().addListener((observable, oldValue, newValue) -> { Button onlineButton = (Button) getDialogPane().lookupButton(onlineButtonType); onlineButton.setDefaultButton(newValue); diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java index 95719ca0..3eea4fd8 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java @@ -266,6 +266,7 @@ public class SendController extends WalletFormController implements Initializabl if(walletTransaction != null) { if(getRecipientValueSats() == null || walletTransaction.getRecipientAmount() != getRecipientValueSats()) { setRecipientValueSats(walletTransaction.getRecipientAmount()); + setFiatAmount(AppController.getFiatCurrencyExchangeRate(), walletTransaction.getRecipientAmount()); } double feeRate = (double)walletTransaction.getFee() / walletTransaction.getTransaction().getVirtualSize();