From 4a1467a11124fd40ade881be4afd05a8b56cfdc9 Mon Sep 17 00:00:00 2001 From: Chris Heaney Date: Tue, 10 Dec 2024 11:28:31 -0500 Subject: [PATCH] rm methods user event records --- sdk/src/dlob/DLOB.ts | 67 -------------------------------------------- 1 file changed, 67 deletions(-) diff --git a/sdk/src/dlob/DLOB.ts b/sdk/src/dlob/DLOB.ts index 52fc07ede..9294ea803 100644 --- a/sdk/src/dlob/DLOB.ts +++ b/sdk/src/dlob/DLOB.ts @@ -170,73 +170,6 @@ export class DLOB { return true; } - public handleOrderRecord(record: OrderRecord, slot: number): void { - this.insertOrder(record.order, record.user.toString(), slot, false); - } - - public handleOrderActionRecord( - record: OrderActionRecord, - slot: number - ): void { - if (isOneOfVariant(record.action, ['place', 'expire'])) { - return; - } - - if (isVariant(record.action, 'trigger')) { - if (record.taker !== null) { - const takerOrder = this.getOrder(record.takerOrderId, record.taker); - if (takerOrder) { - this.trigger(takerOrder, record.taker, slot, false); - } - } - - if (record.maker !== null) { - const makerOrder = this.getOrder(record.makerOrderId, record.maker); - if (makerOrder) { - this.trigger(makerOrder, record.maker, slot, false); - } - } - } else if (isVariant(record.action, 'fill')) { - if (record.taker !== null) { - const takerOrder = this.getOrder(record.takerOrderId, record.taker); - if (takerOrder) { - this.updateOrder( - takerOrder, - record.taker, - slot, - record.takerOrderCumulativeBaseAssetAmountFilled - ); - } - } - - if (record.maker !== null) { - const makerOrder = this.getOrder(record.makerOrderId, record.maker); - if (makerOrder) { - this.updateOrder( - makerOrder, - record.maker, - slot, - record.makerOrderCumulativeBaseAssetAmountFilled - ); - } - } - } else if (isVariant(record.action, 'cancel')) { - if (record.taker !== null) { - const takerOrder = this.getOrder(record.takerOrderId, record.taker); - if (takerOrder) { - this.delete(takerOrder, record.taker, slot); - } - } - - if (record.maker !== null) { - const makerOrder = this.getOrder(record.makerOrderId, record.maker); - if (makerOrder) { - this.delete(makerOrder, record.maker, slot); - } - } - } - } - public insertOrder( order: Order, userAccount: string,