From 95fc2ff514c15a09b2371090c7959c156de676cf Mon Sep 17 00:00:00 2001 From: tyleroooo Date: Tue, 14 Jan 2025 20:45:54 -0500 Subject: [PATCH] fix(bonsai-core): one more tiny log detail (#1435) --- src/abacus-ts/websocket/orderbook.ts | 4 +++- src/abacus-ts/websocket/parentSubaccount.ts | 3 ++- src/abacus-ts/websocket/trades.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/abacus-ts/websocket/orderbook.ts b/src/abacus-ts/websocket/orderbook.ts index be5068198..e15bbf346 100644 --- a/src/abacus-ts/websocket/orderbook.ts +++ b/src/abacus-ts/websocket/orderbook.ts @@ -45,7 +45,9 @@ function orderbookWebsocketValueCreator( const updates = isWsOrderbookUpdateResponses(baseUpdates); let startingValue = value.data; if (startingValue == null) { - logAbacusTsError('OrderbookTracker', 'found unexpectedly null base data in update'); + logAbacusTsError('OrderbookTracker', 'found unexpectedly null base data in update', { + marketId, + }); return value; } startingValue = { asks: { ...startingValue.asks }, bids: { ...startingValue.bids } }; diff --git a/src/abacus-ts/websocket/parentSubaccount.ts b/src/abacus-ts/websocket/parentSubaccount.ts index 76b2530f0..d19eb9a25 100644 --- a/src/abacus-ts/websocket/parentSubaccount.ts +++ b/src/abacus-ts/websocket/parentSubaccount.ts @@ -120,7 +120,8 @@ function accountWebsocketValueCreator( if (value.data == null) { logAbacusTsError( 'ParentSubaccountTracker', - 'found unexpectedly null base data in update' + 'found unexpectedly null base data in update', + { address, subaccountNumber } ); return value; } diff --git a/src/abacus-ts/websocket/trades.ts b/src/abacus-ts/websocket/trades.ts index b423a48ca..9c17f02a3 100644 --- a/src/abacus-ts/websocket/trades.ts +++ b/src/abacus-ts/websocket/trades.ts @@ -38,7 +38,7 @@ function tradesWebsocketValueCreator( const startingValue = value.data; if (startingValue == null) { // eslint-disable-next-line no-console - console.log('MarketsTracker found unexpectedly null base data in update'); + console.log('MarketsTracker found unexpectedly null base data in update', { marketId }); return value; } const allNewTrades = updates.flatMap((u) => u.trades).toReversed();