From b937fdf07bdcb964bcc9d2b3269a989ca3f828e2 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 18 Sep 2021 11:10:40 +0200 Subject: [PATCH] re-add botId to trade object --- src/store/modules/ftbot/index.ts | 2 ++ src/types/trades.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/store/modules/ftbot/index.ts b/src/store/modules/ftbot/index.ts index 144f072f..ceaaab5d 100644 --- a/src/store/modules/ftbot/index.ts +++ b/src/store/modules/ftbot/index.ts @@ -522,6 +522,7 @@ export function createBotSubStore(botId: string) { // Add botId to all trades trades = trades.map((t) => ({ ...t, + botId, botTradeId: `${botId}__${t.trade_id}`, })); commit('updateTrades', { trades, tradesCount }); @@ -576,6 +577,7 @@ export function createBotSubStore(botId: string) { const openTrades = result.data.map((t) => ({ ...t, + botId, botTradeId: `${botId}__${t.trade_id}`, })); diff --git a/src/types/trades.ts b/src/types/trades.ts index 5987d8df..cc978cc3 100644 --- a/src/types/trades.ts +++ b/src/types/trades.ts @@ -3,6 +3,7 @@ export interface Trade { * BotId - only available on "all" methods. * corresponds to the UI (ftbot.1) - does NOT relate to the backend */ + botId: string; botTradeId: string; trade_id: number; pair: string;