diff --git a/sdk/src/dlob/DLOB.ts b/sdk/src/dlob/DLOB.ts index 9294ea803..03d4d29b9 100644 --- a/sdk/src/dlob/DLOB.ts +++ b/sdk/src/dlob/DLOB.ts @@ -1,4 +1,4 @@ -import { getOrderSignature, getVammNodeGenerator, NodeList } from './NodeList'; +import { getOrderSignature, NodeList } from './NodeList'; import { BASE_PRECISION, BN, @@ -1181,7 +1181,7 @@ export class DLOB { */ *getAsks( marketIndex: number, - fallbackAsk: BN | undefined, + _fallbackAsk: BN | undefined, slot: number, marketType: MarketType, oraclePriceData: OraclePriceData, @@ -1196,11 +1196,6 @@ export class DLOB { this.getRestingLimitAsks(marketIndex, slot, marketType, oraclePriceData), ]; - const marketTypeStr = getVariant(marketType) as MarketTypeStr; - if (marketTypeStr === 'perp' && fallbackAsk) { - generatorList.push(getVammNodeGenerator(fallbackAsk)); - } - yield* this.getBestNode( generatorList, oraclePriceData, @@ -1231,7 +1226,7 @@ export class DLOB { */ *getBids( marketIndex: number, - fallbackBid: BN | undefined, + _fallbackBid: BN | undefined, slot: number, marketType: MarketType, oraclePriceData: OraclePriceData, @@ -1246,11 +1241,6 @@ export class DLOB { this.getRestingLimitBids(marketIndex, slot, marketType, oraclePriceData), ]; - const marketTypeStr = getVariant(marketType) as MarketTypeStr; - if (marketTypeStr === 'perp' && fallbackBid) { - generatorList.push(getVammNodeGenerator(fallbackBid)); - } - yield* this.getBestNode( generatorList, oraclePriceData, diff --git a/sdk/src/dlob/NodeList.ts b/sdk/src/dlob/NodeList.ts index ab2dd235d..ab1169bcb 100644 --- a/sdk/src/dlob/NodeList.ts +++ b/sdk/src/dlob/NodeList.ts @@ -172,20 +172,3 @@ export class NodeList } } } - -export function* getVammNodeGenerator( - price: BN | undefined -): Generator { - if (!price) { - return; - } - yield { - getPrice: () => price, - isVammNode: () => true, - order: undefined, - userAccount: undefined, - isUserProtectedMaker: false, - isBaseFilled: () => false, - haveFilled: false, - }; -}