fix fiat amount update on transaction update

This commit is contained in:
Craig Raw 2020-09-01 13:13:38 +02:00
parent ed9bc882b7
commit 4cdffec060
2 changed files with 3 additions and 0 deletions

View file

@ -90,6 +90,8 @@ public class WelcomeDialog extends Dialog<Mode> {
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);

View file

@ -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();