Allocation only for running bot

This commit is contained in:
2025-10-05 02:07:20 +07:00
parent 3581607375
commit cad70799b5
2 changed files with 2 additions and 27 deletions

View File

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

View File

@@ -120,7 +120,7 @@ namespace Managing.Application.ManageBot
if (botConfig.BotTradingBalance > availableAllocation) if (botConfig.BotTradingBalance > availableAllocation)
{ {
throw new InvalidOperationException( 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); var balanceCheckResult = await CheckAccountBalancesAsync(account);
@@ -397,6 +397,7 @@ namespace Managing.Application.ManageBot
foreach (var bot in botsForUser) foreach (var bot in botsForUser)
{ {
if (excludeIdentifier != default && bot.Identifier == excludeIdentifier) if (excludeIdentifier != default && bot.Identifier == excludeIdentifier)
if (bot.Status != BotStatus.Running)
{ {
continue; continue;
} }