Make sure wallet support decimal fee, and allow user to select different fee rate based on expected confirmation time

This commit is contained in:
nicolas.dorier
2020-05-05 19:06:59 +09:00
parent 2226884946
commit 87352f0b62
9 changed files with 83 additions and 23 deletions

View File

@@ -44,7 +44,11 @@ namespace BTCPayServer.Controllers
}
psbtRequest.FeePreference = new FeePreference();
psbtRequest.FeePreference.ExplicitFeeRate = new FeeRate(Money.Satoshis(sendModel.FeeSatoshiPerByte), 1);
if (sendModel.FeeSatoshiPerByte is decimal v &&
v > decimal.Zero)
{
psbtRequest.FeePreference.ExplicitFeeRate = new FeeRate(Money.Satoshis(v), 1);
}
if (sendModel.NoChange)
{
psbtRequest.ExplicitChangeAddress = psbtRequest.Destinations.First().Destination;