Fix restart with no accountName

This commit is contained in:
2025-10-12 16:28:53 +07:00
parent 30fccc3644
commit 49b0f7b696
2 changed files with 35 additions and 1 deletions

View File

@@ -129,6 +129,7 @@ namespace Managing.Application.ManageBot
return firstAccount;
});
botConfig.AccountName = account.Name;
_tradingBotLogger.LogInformation("Bot '{BotName}' (ID: {BotId}) using fallback account '{AccountName}' for user '{UserName}'",
botConfig.Name, identifier, account.Name, user.Name);
}
@@ -159,6 +160,7 @@ namespace Managing.Application.ManageBot
}
}
await UpdateBotConfiguration(identifier, botConfig);
var grainState = await botGrain.GetBotDataAsync();
if (previousStatus == BotStatus.Saved)