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

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;