ws: set includeVamm based on market status

This commit is contained in:
wphan
2024-01-27 12:12:23 -08:00
parent 98469e2c42
commit cf677ae66f

View File

@@ -58,10 +58,11 @@ export class DLOBSubscriberIO extends DLOBSubscriber {
this.lastSeenL2Formatted.set(MarketType.PERP, new Map()); this.lastSeenL2Formatted.set(MarketType.PERP, new Map());
for (const market of config.perpMarketInfos) { for (const market of config.perpMarketInfos) {
let includeVamm = true; const perpMarket = this.driftClient.getPerpMarketAccount(
if (market.marketIndex === 17) { market.marketIndex
includeVamm = false; );
} const includeVamm = !isVariant(perpMarket.status, 'ammPaused');
this.marketL2Args.push({ this.marketL2Args.push({
marketIndex: market.marketIndex, marketIndex: market.marketIndex,
marketType: MarketType.PERP, marketType: MarketType.PERP,