Fix proxy build
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using Managing.Application.Abstractions.Grains;
|
using Managing.Application.Abstractions.Grains;
|
||||||
using Managing.Application.Abstractions.Repositories;
|
using Managing.Application.Abstractions.Repositories;
|
||||||
|
using Managing.Common;
|
||||||
using Managing.Domain.Backtests;
|
using Managing.Domain.Backtests;
|
||||||
using Managing.Domain.Bots;
|
using Managing.Domain.Bots;
|
||||||
using Managing.Domain.Candles;
|
using Managing.Domain.Candles;
|
||||||
@@ -91,7 +92,7 @@ public class BacktestTradingBotGrain : Grain, IBacktestTradingBotGrain
|
|||||||
|
|
||||||
// Check if wallet balance fell below 10 USDC and break if so
|
// Check if wallet balance fell below 10 USDC and break if so
|
||||||
var currentWalletBalance = tradingBot.WalletBalances.Values.LastOrDefault();
|
var currentWalletBalance = tradingBot.WalletBalances.Values.LastOrDefault();
|
||||||
if (currentWalletBalance < 10m)
|
if (currentWalletBalance < Constants.GMX.Config.MinimumPositionAmount)
|
||||||
{
|
{
|
||||||
_logger.LogWarning(
|
_logger.LogWarning(
|
||||||
"Backtest stopped early: Wallet balance fell below 10 USDC (Current: {CurrentBalance:F2} USDC) at candle {CurrentCandle}/{TotalCandles} from {CandleDate}",
|
"Backtest stopped early: Wallet balance fell below 10 USDC (Current: {CurrentBalance:F2} USDC) at candle {CurrentCandle}/{TotalCandles} from {CandleDate}",
|
||||||
|
|||||||
@@ -1290,9 +1290,9 @@ export default fp(async (fastify) => {
|
|||||||
try {
|
try {
|
||||||
const sdk = await getClientForAddress("0x0000000000000000000000000000000000000000");
|
const sdk = await getClientForAddress("0x0000000000000000000000000000000000000000");
|
||||||
fastify.log.info('GMX client initialized successfully');
|
fastify.log.info('GMX client initialized successfully');
|
||||||
fastify.log.info('GMX UI Fee Receiver:', sdk.config.settings.uiFeeReceiverAccount);
|
fastify.log.info(`GMX UI Fee Receiver: ${sdk.config.settings.uiFeeReceiverAccount}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
fastify.log.warn('GMX client initialization failed, but continuing:', error);
|
fastify.log.warn(`GMX client initialization failed, but continuing: ${error}`);
|
||||||
// The client will be initialized when actually needed
|
// The client will be initialized when actually needed
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1232,9 +1232,9 @@ export default fp(async (fastify) => {
|
|||||||
// Test the Privy client initialization
|
// Test the Privy client initialization
|
||||||
try {
|
try {
|
||||||
const testClient = getPrivyClient(fastify);
|
const testClient = getPrivyClient(fastify);
|
||||||
fastify.log.info('Privy client initialized successfully', (await testClient.getAppSettings()).id);
|
fastify.log.info(`Privy client initialized successfully: ${(await testClient.getAppSettings()).id}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
fastify.log.error('Failed to initialize Privy client:', error);
|
fastify.log.error(`Failed to initialize Privy client: ${error}`);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
Reference in New Issue
Block a user