attach ts and send ack on subscribe

This commit is contained in:
Nour Alharithi
2024-01-19 12:37:49 -08:00
parent 207521e95c
commit fe19c821af
3 changed files with 15 additions and 5 deletions

View File

@@ -140,9 +140,13 @@ export const addMarketSlotToResponse = (
): void => {
let marketSlot: number;
if (isVariant(marketType, 'perp')) {
marketSlot = driftClient.accountSubscriber.getMarketAccountAndSlot(marketIndex).slot;
marketSlot =
driftClient.accountSubscriber.getMarketAccountAndSlot(marketIndex).slot;
} else {
marketSlot = driftClient.accountSubscriber.getSpotMarketAccountAndSlot(marketIndex).slot;
marketSlot =
driftClient.accountSubscriber.getSpotMarketAccountAndSlot(
marketIndex
).slot;
}
response['marketSlot'] = marketSlot;
};