Make sure that DOGECOIN pays min amount of fee

This commit is contained in:
nicolas.dorier
2018-06-30 22:05:41 +09:00
parent 42d60ef84b
commit 63fe0f6612
4 changed files with 15 additions and 3 deletions

View File

@@ -320,7 +320,17 @@ namespace BTCPayServer.Controllers
builder.SubtractFees();
}
builder.SetChange(changeAddress.Item1);
builder.SendEstimatedFees(feeRateValue);
if (network.MinFee == null)
{
builder.SendEstimatedFees(feeRateValue);
}
else
{
var estimatedFee = builder.EstimateFees(feeRateValue);
if (network.MinFee > estimatedFee)
builder.SendFees(network.MinFee);
}
builder.Shuffle();
var unsigned = builder.BuildTransaction(false);