From 8959906b56f5f8a4b61dbe98b31a1bb2ce8b4c9b Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 31 Oct 2020 09:40:56 +0100 Subject: [PATCH] Add set_pair Action and mutation --- src/store/modules/ftbot.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/store/modules/ftbot.ts b/src/store/modules/ftbot.ts index 41fd0df8..c7f9d157 100644 --- a/src/store/modules/ftbot.ts +++ b/src/store/modules/ftbot.ts @@ -146,6 +146,9 @@ export default { state.detailTradeId = trade ? trade.trade_id : null; state.selectedPair = trade ? trade.pair : state.selectedPair; }, + setSelectedPair(state, pair: string) { + state.selectedPair = pair; + }, updateStrategyList(state, result: StrategyListResult) { state.strategyList = result.strategies; }, @@ -191,6 +194,9 @@ export default { setDetailTrade({ commit }, trade: Trade) { commit('setDetailTrade', trade); }, + setSelectedPair({ commit }, pair: string) { + commit('setSelectedPair', pair); + }, getTrades({ commit }) { return api .get('/trades')