Fix wrong usage of type

This commit is contained in:
Matthias 2023-11-11 15:13:26 +01:00
parent 4f1852e50e
commit cc772d0276

View File

@ -47,6 +47,7 @@ import {
BacktestMetadataPatch, BacktestMetadataPatch,
BacktestResultUpdate, BacktestResultUpdate,
TimeSummaryOptions, TimeSummaryOptions,
PerformanceEntry,
} from '@/types'; } from '@/types';
import axios, { AxiosResponse } from 'axios'; import axios, { AxiosResponse } from 'axios';
import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
@ -78,7 +79,7 @@ export function createBotSubStore(botId: string, botName: string) {
trades: [] as ClosedTrade[], trades: [] as ClosedTrade[],
openTrades: [] as Trade[], openTrades: [] as Trade[],
tradeCount: 0, tradeCount: 0,
performanceStats: [] as Performance[], performanceStats: [] as PerformanceEntry[],
whitelist: [] as string[], whitelist: [] as string[],
blacklist: [] as string[], blacklist: [] as string[],
profit: {} as ProfitInterface, profit: {} as ProfitInterface,
@ -486,7 +487,7 @@ export function createBotSubStore(botId: string, botName: string) {
}, },
async getPerformance() { async getPerformance() {
try { try {
const { data } = await api.get<Performance[]>('/performance'); const { data } = await api.get<PerformanceEntry[]>('/performance');
this.performanceStats = data; this.performanceStats = data;
return Promise.resolve(data); return Promise.resolve(data);
} catch (error) { } catch (error) {