From 4aad20b30b7af8e73a1e1a9db202ad3125a2de32 Mon Sep 17 00:00:00 2001 From: cryptooda Date: Sun, 5 Oct 2025 02:21:44 +0700 Subject: [PATCH] Fix status bot allocation start/restart --- src/Managing.Application/ManageBot/BotService.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Managing.Application/ManageBot/BotService.cs b/src/Managing.Application/ManageBot/BotService.cs index 11ae33ac..92a960bb 100644 --- a/src/Managing.Application/ManageBot/BotService.cs +++ b/src/Managing.Application/ManageBot/BotService.cs @@ -394,10 +394,17 @@ namespace Managing.Application.ManageBot var totalAllocatedForAccount = 0m; var usdcBalance = account.Balances.FirstOrDefault(b => b.TokenName == Ticker.USDC.ToString()); + Console.WriteLine($"Bots for user: {botsForUser.Count}"); + Console.WriteLine($"Exclude identifier: {excludeIdentifier}"); + foreach (var bot in botsForUser) { if (excludeIdentifier != default && bot.Identifier == excludeIdentifier) - if (bot.Status != BotStatus.Running) + { + continue; + } + + if (bot.Status == BotStatus.Stopped || bot.Status == BotStatus.Saved) { continue; } @@ -407,6 +414,7 @@ namespace Managing.Application.ManageBot try { config = await grain.GetConfiguration(); + Console.WriteLine($"Bot Balance: {config.BotTradingBalance}"); } catch {