From 62375292e9fff30c7dfb72d3531d772d4e9237e8 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Sun, 18 Aug 2024 01:03:44 +0800 Subject: [PATCH] Off by 1 on the decimals --- KfChatDotNetBot/Services/Chipsgg.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KfChatDotNetBot/Services/Chipsgg.cs b/KfChatDotNetBot/Services/Chipsgg.cs index 117c4db..5b04df2 100644 --- a/KfChatDotNetBot/Services/Chipsgg.cs +++ b/KfChatDotNetBot/Services/Chipsgg.cs @@ -307,8 +307,8 @@ public class Chipsgg : IDisposable // Another mysterious thing where winnings are sometimes sent and sometimes not. Presumed to be 0 if (winnings == string.Empty) winnings = "0"; - bet.Winnings = double.Parse(winnings) / double.Parse(1.ToString().PadRight(currencyData.Decimals, '0')); - bet.Amount = double.Parse(amount) / double.Parse(1.ToString().PadRight(currencyData.Decimals, '0')); + bet.Winnings = double.Parse(winnings) / double.Parse(1.ToString().PadRight(currencyData.Decimals + 1, '0')); + bet.Amount = double.Parse(amount) / double.Parse(1.ToString().PadRight(currencyData.Decimals + 1, '0')); bet.CurrencyPrice = currencyData.Price ?? 0; OnChipsggRecentBet?.Invoke(this, bet); return;