Fix: Incorrect rounding in the receipt of PoS invoice (fix #5071) (#5072)

This commit is contained in:
Nicolas Dorier 2023-06-13 20:34:21 +02:00 committed by GitHub
parent d3222df396
commit 918cd152b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ namespace BTCPayServer.Rating
while (true)
{
var rounded = decimal.Round(value, divisibility, MidpointRounding.AwayFromZero);
if ((Math.Abs(rounded - value) / value) < 0.001m)
if ((Math.Abs(rounded - value) / value) < 0.01m)
{
value = rounded;
break;