Do not round satoshis to 8 decimal

This commit is contained in:
nicolas.dorier 2018-07-23 18:15:40 +09:00
parent 96b7373d88
commit 060876d07f
2 changed files with 1 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<Version>1.0.2.60</Version>
<Version>1.0.2.61</Version>
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208</NoWarn>
</PropertyGroup>
<ItemGroup>

View File

@ -710,7 +710,6 @@ 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;
}