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,
PairHistoryPayload,
PlotConfig,
StrategyResult,
EMPTY_PLOTCONFIG,
} from '@/types';
@ -98,8 +99,8 @@ export default {
setDetailTrade(state, trade: Trade) {
state.detailTradeId = trade ? trade.trade_id : null;
},
updateStrategyList(state, list) {
state.strategyList = list;
updateStrategyList(state, result: StrategyResult) {
state.strategyList = result.strategies;
},
updatePairCandles(state, { 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;
}
export interface StrategyResult {
strategies: Array<string>;
}
export interface PairCandlePayload {
pair: string;
timeframe: string;