From cad70799b5b8ca71864689ee4010ab1b588345b4 Mon Sep 17 00:00:00 2001 From: cryptooda Date: Sun, 5 Oct 2025 02:07:20 +0700 Subject: [PATCH] Allocation only for running bot --- .github/workflows/dotnet.yml | 26 ------------------- .../ManageBot/BotService.cs | 3 ++- 2 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml deleted file mode 100644 index f5538f56..00000000 --- a/.github/workflows/dotnet.yml +++ /dev/null @@ -1,26 +0,0 @@ -# This workflow will build a .NET project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net - -name: .NET - -on: - push: - branches: [ "dev" ] - pull_request: - branches: [ "dev" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - - name: Restore API dependencies - run: dotnet restore ./src/Managing.Api/Managing.Api.csproj - - name: Build API - run: dotnet build --no-restore ./src/Managing.Api/Managing.Api.csproj diff --git a/src/Managing.Application/ManageBot/BotService.cs b/src/Managing.Application/ManageBot/BotService.cs index abc2e0f4..11ae33ac 100644 --- a/src/Managing.Application/ManageBot/BotService.cs +++ b/src/Managing.Application/ManageBot/BotService.cs @@ -120,7 +120,7 @@ namespace Managing.Application.ManageBot if (botConfig.BotTradingBalance > availableAllocation) { throw new InvalidOperationException( - $"Insufficient available allocation on account '{account.Name}'. Requested: {botConfig.BotTradingBalance:F2} USDC, Available: {availableAllocation:F2} USDC."); + $"Insufficient available allocation. Requested: {botConfig.BotTradingBalance:F2} USDC, Available: {availableAllocation:F2} USDC."); } var balanceCheckResult = await CheckAccountBalancesAsync(account); @@ -397,6 +397,7 @@ namespace Managing.Application.ManageBot foreach (var bot in botsForUser) { if (excludeIdentifier != default && bot.Identifier == excludeIdentifier) + if (bot.Status != BotStatus.Running) { continue; }