re-add botId to trade object

This commit is contained in:
Matthias 2021-09-18 11:10:40 +02:00
parent 4e171457fe
commit b937fdf07b
2 changed files with 3 additions and 0 deletions

View File

@ -522,6 +522,7 @@ export function createBotSubStore(botId: string) {
// Add botId to all trades // Add botId to all trades
trades = trades.map((t) => ({ trades = trades.map((t) => ({
...t, ...t,
botId,
botTradeId: `${botId}__${t.trade_id}`, botTradeId: `${botId}__${t.trade_id}`,
})); }));
commit('updateTrades', { trades, tradesCount }); commit('updateTrades', { trades, tradesCount });
@ -576,6 +577,7 @@ export function createBotSubStore(botId: string) {
const openTrades = result.data.map((t) => ({ const openTrades = result.data.map((t) => ({
...t, ...t,
botId,
botTradeId: `${botId}__${t.trade_id}`, botTradeId: `${botId}__${t.trade_id}`,
})); }));

View File

@ -3,6 +3,7 @@ export interface Trade {
* BotId - only available on "all" methods. * BotId - only available on "all" methods.
* corresponds to the UI (ftbot.1) - does NOT relate to the backend * corresponds to the UI (ftbot.1) - does NOT relate to the backend
*/ */
botId: string;
botTradeId: string; botTradeId: string;
trade_id: number; trade_id: number;
pair: string; pair: string;