set minimum fee rate to the lower of estimated and user configured fee rates

This commit is contained in:
Craig Raw 2024-09-13 13:04:04 +02:00
parent faa81f2273
commit 33ba472843

View file

@ -850,7 +850,11 @@ public class SendController extends WalletFormController implements Initializabl
private Double getMinimumFeeRate() {
Optional<Double> 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);
}