From 33ba472843606f0846c776b37e29291656aa5c2b Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Fri, 13 Sep 2024 13:04:04 +0200 Subject: [PATCH] set minimum fee rate to the lower of estimated and user configured fee rates --- .../com/sparrowwallet/sparrow/wallet/SendController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java index 1cba5000..b727e7f9 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/SendController.java @@ -850,7 +850,11 @@ public class SendController extends WalletFormController implements Initializabl private Double getMinimumFeeRate() { Optional optMinFeeRate = getTargetBlocksFeeRates().values().stream().min(Double::compareTo); - Double minRate = optMinFeeRate.orElse(getFallbackFeeRate()); + double minRate = optMinFeeRate.orElse(getFallbackFeeRate()); + Double userFeeRate = getFeeRate(); + if(userFeeRate != null) { + minRate = Math.min(userFeeRate, minRate); + } return Math.max(minRate, Transaction.DUST_RELAY_TX_FEE); }