From ccd8944dc2c8af3ade53b5389309a18bef1c5b12 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 11 Oct 2021 19:41:31 +0200 Subject: [PATCH] Fix backtesting switching not working --- src/store/modules/ftbot/index.ts | 4 ++++ src/views/Backtesting.vue | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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;