Add strategy type to result

This commit is contained in:
Matthias 2020-08-01 17:23:06 +02:00
parent 297f3e0420
commit 32fa21fbf8
2 changed files with 7 additions and 2 deletions

View File

@ -9,6 +9,7 @@ import {
PairCandlePayload, PairCandlePayload,
PairHistoryPayload, PairHistoryPayload,
PlotConfig, PlotConfig,
StrategyResult,
EMPTY_PLOTCONFIG, EMPTY_PLOTCONFIG,
} from '@/types'; } from '@/types';
@ -98,8 +99,8 @@ export default {
setDetailTrade(state, trade: Trade) { setDetailTrade(state, trade: Trade) {
state.detailTradeId = trade ? trade.trade_id : null; state.detailTradeId = trade ? trade.trade_id : null;
}, },
updateStrategyList(state, list) { updateStrategyList(state, result: StrategyResult) {
state.strategyList = list; state.strategyList = result.strategies;
}, },
updatePairCandles(state, { pair, timeframe, data }) { updatePairCandles(state, { pair, timeframe, data }) {
state.candleData = { ...state.candleData, [`${pair}__${timeframe}`]: data }; state.candleData = { ...state.candleData, [`${pair}__${timeframe}`]: data };

View File

@ -140,6 +140,10 @@ export interface ClosedTrade extends Trade {
open_order_id?: string; open_order_id?: string;
} }
export interface StrategyResult {
strategies: Array<string>;
}
export interface PairCandlePayload { export interface PairCandlePayload {
pair: string; pair: string;
timeframe: string; timeframe: string;