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
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}`,
}));

View File

@ -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;