mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
Fix rounding bug
This commit is contained in:
parent
7afa726ddc
commit
c2f282f85c
@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<Version>1.0.2.58</Version>
|
||||
<Version>1.0.2.59</Version>
|
||||
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
@ -710,6 +710,7 @@ namespace BTCPayServer.Services.Invoices
|
||||
accounting.DueUncapped = accounting.TotalDue - accounting.Paid;
|
||||
accounting.NetworkFee = accounting.TotalDue - totalDueNoNetworkCost;
|
||||
var minimumTotalDueSatoshi = Math.Max(1.0m, accounting.TotalDue.Satoshi * (1.0m - ((decimal)ParentEntity.PaymentTolerance / 100.0m)));
|
||||
minimumTotalDueSatoshi = Extensions.RoundUp(minimumTotalDueSatoshi, precision);
|
||||
accounting.MinimumTotalDue = Money.Satoshis(minimumTotalDueSatoshi);
|
||||
return accounting;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user