Fix status bot allocation start/restart

This commit is contained in:
2025-10-05 02:21:44 +07:00
parent cad70799b5
commit 4aad20b30b

View File

@@ -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
{