Calculate fee amount from fee rate if available

This commit is contained in:
OmarHatem 2022-12-16 19:21:40 +02:00
parent afd9fe7554
commit 7ffb654065

View file

@ -191,8 +191,10 @@ abstract class ElectrumWalletBase extends WalletBase<ElectrumBalance,
throw BitcoinTransactionNoInputsException(); throw BitcoinTransactionNoInputsException();
} }
final allAmountFee = feeAmountForPriority( final allAmountFee = transactionCredentials.feeRate != null
transactionCredentials.priority!, inputs.length, outputs.length); ? feeAmountWithFeeRate(transactionCredentials.feeRate!, inputs.length, outputs.length)
: feeAmountForPriority(transactionCredentials.priority!, inputs.length, outputs.length);
final allAmount = allInputsAmount - allAmountFee; final allAmount = allInputsAmount - allAmountFee;
var credentialsAmount = 0; var credentialsAmount = 0;