mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Add a new invoice event: expiredPaidPartial and fix some corner case for tolerance
This commit is contained in:
@@ -676,10 +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 = new Money(Convert.ToInt32(Math.Ceiling(accounting.TotalDue.Satoshi -
|
||||
(accounting.TotalDue.Satoshi *
|
||||
(ParentEntity.PaymentTolerance / 100.0)
|
||||
))));
|
||||
accounting.MinimumTotalDue = Money.Satoshis(accounting.TotalDue.Satoshi * (1.0m - ((decimal)ParentEntity.PaymentTolerance / 100.0m)));
|
||||
return accounting;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user