diff --git a/src/store/modules/ftbot/index.ts b/src/store/modules/ftbot/index.ts index d16795c6..46f3238e 100644 --- a/src/store/modules/ftbot/index.ts +++ b/src/store/modules/ftbot/index.ts @@ -138,6 +138,7 @@ export enum BotStoreActions { pollBacktest = 'pollBacktest', removeBacktest = 'removeBacktest', stopBacktest = 'stopBacktest', + setBacktestResultKey = 'setBacktestResultKey', sysInfo = 'sysInfo', logout = 'logout', } @@ -951,6 +952,9 @@ export function createBotSubStore(botId: string, botName: string) { return Promise.reject(err); } }, + [BotStoreActions.setBacktestResultKey]({ commit }, key: string) { + commit('setBacktestResultKey', key); + }, async [BotStoreActions.sysInfo]({ commit }) { try { const result = await api.get('/sysinfo'); diff --git a/src/views/Backtesting.vue b/src/views/Backtesting.vue index 42c251b4..3279cfe7 100644 --- a/src/views/Backtesting.vue +++ b/src/views/Backtesting.vue @@ -385,7 +385,7 @@ export default class Backtesting extends Vue { @ftbot.Action stopBacktest!: () => void; // eslint-disable-next-line @typescript-eslint/no-unused-vars - @ftbot.Mutation setBacktestResultKey!: (key: string) => void; + @ftbot.Action setBacktestResultKey!: (key: string) => void; formatPercent = formatPercent;