fix: correct simulation API field names

The backend expects 'check_interval' not 'interval_seconds',
and 'chain' is required.
This commit is contained in:
shokollm
2026-04-11 17:22:45 +00:00
parent 19f28fc599
commit 0d63a10ac8
2 changed files with 3 additions and 2 deletions

View File

@@ -189,7 +189,7 @@ export const api = {
}, },
simulate: { simulate: {
async start(botId: string, config: { token: string; interval_seconds: number; auto_execute: boolean }): Promise<Simulation> { async start(botId: string, config: { token: string; chain?: string; check_interval: number; auto_execute: boolean }): Promise<Simulation> {
const response = await fetch(`${API_URL}/bots/${botId}/simulate`, { const response = await fetch(`${API_URL}/bots/${botId}/simulate`, {
method: 'POST', method: 'POST',
headers: getAuthHeaders(), headers: getAuthHeaders(),

View File

@@ -68,7 +68,8 @@
try { try {
const simulation = await api.simulate.start(botId, { const simulation = await api.simulate.start(botId, {
token: tokenAddress, token: tokenAddress,
interval_seconds: intervalSeconds, chain: 'bsc',
check_interval: intervalSeconds,
auto_execute: autoExecute auto_execute: autoExecute
}); });
setCurrentSimulation(simulation); setCurrentSimulation(simulation);