Allocation only for running bot
This commit is contained in:
26
.github/workflows/dotnet.yml
vendored
26
.github/workflows/dotnet.yml
vendored
@@ -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
|
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user