diff --git a/common-ts/src/Config.ts b/common-ts/src/Config.ts index 0bdaf56..00fe291 100644 --- a/common-ts/src/Config.ts +++ b/common-ts/src/Config.ts @@ -4,18 +4,15 @@ import { initialize, PerpMarketConfig, } from '@drift-labs/sdk'; -import { JLP_POOL_ID, MAIN_POOL_ID } from './constants'; export const Config: { initialized: boolean; spotMarketsLookup: SpotMarketConfig[]; - jlpSpotMarketsLookup: SpotMarketConfig[]; perpMarketsLookup: PerpMarketConfig[]; sdkConfig: ReturnType; } = { initialized: false, spotMarketsLookup: [], - jlpSpotMarketsLookup: [], perpMarketsLookup: [], sdkConfig: undefined, }; @@ -31,28 +28,18 @@ export const Initialize = (env: DriftEnv) => { ...SDKConfig.PERP_MARKETS.map((market) => market.marketIndex) ); - const jlpSpotMarkets = new Array(maxSpotMarketIndex); const spotMarkets = new Array(maxSpotMarketIndex); const markets = new Array(maxPerpMarketIndex); - SDKConfig.SPOT_MARKETS.filter( - (market) => market.poolId === MAIN_POOL_ID - ).forEach((spotMarket) => { + SDKConfig.SPOT_MARKETS.forEach((spotMarket) => { spotMarkets[spotMarket.marketIndex] = spotMarket; }); - SDKConfig.SPOT_MARKETS.filter( - (market) => market.poolId === JLP_POOL_ID - ).forEach((spotMarket) => { - jlpSpotMarkets[spotMarket.marketIndex] = spotMarket; - }); - SDKConfig.PERP_MARKETS.forEach((perpMarket) => { markets[perpMarket.marketIndex] = perpMarket; }); Config.spotMarketsLookup = spotMarkets; - Config.jlpSpotMarketsLookup = jlpSpotMarkets; Config.perpMarketsLookup = markets; Config.initialized = true;