mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Make sure wallet support decimal fee, and allow user to select different fee rate based on expected confirmation time
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user