fix: correct simulation API field names
The backend expects 'check_interval' not 'interval_seconds', and 'chain' is required.
This commit is contained in:
@@ -189,7 +189,7 @@ export const api = {
|
||||
},
|
||||
|
||||
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`, {
|
||||
method: 'POST',
|
||||
headers: getAuthHeaders(),
|
||||
|
||||
@@ -68,7 +68,8 @@
|
||||
try {
|
||||
const simulation = await api.simulate.start(botId, {
|
||||
token: tokenAddress,
|
||||
interval_seconds: intervalSeconds,
|
||||
chain: 'bsc',
|
||||
check_interval: intervalSeconds,
|
||||
auto_execute: autoExecute
|
||||
});
|
||||
setCurrentSimulation(simulation);
|
||||
|
||||
Reference in New Issue
Block a user