mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
cap MinimumTotalDue to 1 satoshi
This commit is contained in:
parent
b96f464e39
commit
87e28b70fd
1 changed files with 1 additions and 1 deletions
|
@ -676,7 +676,7 @@ namespace BTCPayServer.Services.Invoices
|
|||
accounting.Due = Money.Max(accounting.TotalDue - accounting.Paid, Money.Zero);
|
||||
accounting.DueUncapped = accounting.TotalDue - accounting.Paid;
|
||||
accounting.NetworkFee = accounting.TotalDue - totalDueNoNetworkCost;
|
||||
accounting.MinimumTotalDue = Money.Satoshis(accounting.TotalDue.Satoshi * (1.0m - ((decimal)ParentEntity.PaymentTolerance / 100.0m)));
|
||||
accounting.MinimumTotalDue = Money.Max(Money.Satoshis(1), Money.Satoshis(accounting.TotalDue.Satoshi * (1.0m - ((decimal)ParentEntity.PaymentTolerance / 100.0m))));
|
||||
return accounting;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue