diff --git a/drongo b/drongo index b0d37fe8..0a43f9f6 160000 --- a/drongo +++ b/drongo @@ -1 +1 @@ -Subproject commit b0d37fe8fe6a4bec756e8c24bee562d1a377cf10 +Subproject commit 0a43f9f6a8d0fd849e6552b936f8d15fafe800fa diff --git a/src/main/java/com/sparrowwallet/sparrow/event/IncludeMempoolOutputsChangedEvent.java b/src/main/java/com/sparrowwallet/sparrow/event/IncludeMempoolOutputsChangedEvent.java new file mode 100644 index 00000000..a3e2a03e --- /dev/null +++ b/src/main/java/com/sparrowwallet/sparrow/event/IncludeMempoolOutputsChangedEvent.java @@ -0,0 +1,8 @@ +package com.sparrowwallet.sparrow.event; + +/** + * Empty class to indicate the includeMempoolOutputs config setting has changed + */ +public class IncludeMempoolOutputsChangedEvent { + +} diff --git a/src/main/java/com/sparrowwallet/sparrow/preferences/GeneralPreferencesController.java b/src/main/java/com/sparrowwallet/sparrow/preferences/GeneralPreferencesController.java index cf5f255b..e4593cd6 100644 --- a/src/main/java/com/sparrowwallet/sparrow/preferences/GeneralPreferencesController.java +++ b/src/main/java/com/sparrowwallet/sparrow/preferences/GeneralPreferencesController.java @@ -119,6 +119,7 @@ public class GeneralPreferencesController extends PreferencesDetailController { }); includeMempoolOutputs.selectedProperty().addListener((observableValue, oldValue, newValue) -> { config.setIncludeMempoolOutputs(newValue); + EventManager.get().post(new IncludeMempoolOutputsChangedEvent()); }); notifyNewTransactions.setSelected(config.isNotifyNewTransactions()); diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java index abd67ff1..0aa80d9f 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/PaymentController.java @@ -289,6 +289,8 @@ public class PaymentController extends WalletFormController implements Initializ fiatAmount.setText(""); setSendMax(false); + + amountStatus.setVisible(false); } public void setMaxInput(ActionEvent event) { diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java index 31e84f30..2c8f3eca 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java @@ -338,7 +338,7 @@ public class SendController extends WalletFormController implements Initializabl setTargetBlocks(getTargetBlocks(feeRate)); setFeeRangeRate(feeRate); - if(walletTransaction.getFee() != getFeeValueSats()) { + if(walletTransaction.getFee() != getFeeValueSats() && feeRate > getMinimumFeeRate()) { setFeeValueSats(walletTransaction.getFee()); } } else { @@ -1033,4 +1033,9 @@ public class SendController extends WalletFormController implements Initializabl } } } + + @Subscribe + public void includeMempoolOutputsChangedEvent(IncludeMempoolOutputsChangedEvent event) { + updateTransaction(); + } } diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/TransactionsController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/TransactionsController.java index f6cf6684..c402e4d4 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/TransactionsController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/TransactionsController.java @@ -26,6 +26,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.net.URL; import java.nio.charset.StandardCharsets; +import java.util.Collections; import java.util.Locale; import java.util.ResourceBundle; @@ -226,4 +227,9 @@ public class TransactionsController extends WalletFormController implements Init transactionsTable.refresh(); } } + + @Subscribe + public void includeMempoolOutputsChangedEvent(IncludeMempoolOutputsChangedEvent event) { + walletHistoryChanged(new WalletHistoryChangedEvent(getWalletForm().getWallet(), getWalletForm().getStorage(), Collections.emptyList())); + } } diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java index a17802af..451c7df4 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java @@ -160,4 +160,9 @@ public class UtxosController extends WalletFormController implements Initializab utxosTable.refresh(); } } + + @Subscribe + public void includeMempoolOutputsChangedEvent(IncludeMempoolOutputsChangedEvent event) { + utxosTable.refresh(); + } }