Browse Source

fix fiat amount update on transaction update

bwt 0.9.2
Craig Raw 4 years ago
parent
commit
4cdffec060
  1. 2
      src/main/java/com/sparrowwallet/sparrow/control/WelcomeDialog.java
  2. 1
      src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java

2
src/main/java/com/sparrowwallet/sparrow/control/WelcomeDialog.java

@ -90,6 +90,8 @@ public class WelcomeDialog extends Dialog<Mode> {
private ToggleSwitch createToggle(StatusBar statusBar, ButtonType onlineButtonType, ButtonType offlineButtonType) { private ToggleSwitch createToggle(StatusBar statusBar, ButtonType onlineButtonType, ButtonType offlineButtonType) {
ToggleSwitch toggleSwitch = new UnlabeledToggleSwitch(); ToggleSwitch toggleSwitch = new UnlabeledToggleSwitch();
toggleSwitch.setStyle("-fx-padding: 1px 0 0 0");
toggleSwitch.selectedProperty().addListener((observable, oldValue, newValue) -> { toggleSwitch.selectedProperty().addListener((observable, oldValue, newValue) -> {
Button onlineButton = (Button) getDialogPane().lookupButton(onlineButtonType); Button onlineButton = (Button) getDialogPane().lookupButton(onlineButtonType);
onlineButton.setDefaultButton(newValue); onlineButton.setDefaultButton(newValue);

1
src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java

@ -266,6 +266,7 @@ public class SendController extends WalletFormController implements Initializabl
if(walletTransaction != null) { if(walletTransaction != null) {
if(getRecipientValueSats() == null || walletTransaction.getRecipientAmount() != getRecipientValueSats()) { if(getRecipientValueSats() == null || walletTransaction.getRecipientAmount() != getRecipientValueSats()) {
setRecipientValueSats(walletTransaction.getRecipientAmount()); setRecipientValueSats(walletTransaction.getRecipientAmount());
setFiatAmount(AppController.getFiatCurrencyExchangeRate(), walletTransaction.getRecipientAmount());
} }
double feeRate = (double)walletTransaction.getFee() / walletTransaction.getTransaction().getVirtualSize(); double feeRate = (double)walletTransaction.getFee() / walletTransaction.getTransaction().getVirtualSize();

Loading…
Cancel
Save