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,