mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-01-29 03:31:11 +00:00
fix fiat amount update on transaction update
This commit is contained in:
parent
ed9bc882b7
commit
4cdffec060
2 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||||
|
|
|
@ -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…
Reference in a new issue