mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
set minimum fee rate to the lower of estimated and user configured fee rates
This commit is contained in:
parent
faa81f2273
commit
33ba472843
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue