Skip to content

Commit

Permalink
fix(bonsai-core): one more tiny log detail (#1435)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleroooo authored Jan 15, 2025
1 parent 93517b8 commit 95fc2ff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/abacus-ts/websocket/orderbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 } };
Expand Down
3 changes: 2 additions & 1 deletion src/abacus-ts/websocket/parentSubaccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/abacus-ts/websocket/trades.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 95fc2ff

Please sign in to comment.