Add set_pair Action and mutation

This commit is contained in:
Matthias 2020-10-31 09:40:56 +01:00
parent d0fff3f76b
commit 8959906b56

View File

@ -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')