From 918cd152b13e60cd488c7dc6b6124621848455ee Mon Sep 17 00:00:00 2001 From: Nicolas Dorier Date: Tue, 13 Jun 2023 20:34:21 +0200 Subject: [PATCH] Fix: Incorrect rounding in the receipt of PoS invoice (fix #5071) (#5072) --- BTCPayServer.Rating/Extensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer.Rating/Extensions.cs b/BTCPayServer.Rating/Extensions.cs index a77aaedcf..9d1af928a 100644 --- a/BTCPayServer.Rating/Extensions.cs +++ b/BTCPayServer.Rating/Extensions.cs @@ -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;