From 9d6159e7898edb8adcd97cb3133b5c55fce5bb52 Mon Sep 17 00:00:00 2001 From: Christopher Li Date: Fri, 3 Nov 2023 16:53:37 -0400 Subject: [PATCH] fix liquidations --- .../src/scripts/dydx_liquidation_fill_handler_per_order.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indexer/services/ender/src/scripts/dydx_liquidation_fill_handler_per_order.sql b/indexer/services/ender/src/scripts/dydx_liquidation_fill_handler_per_order.sql index 2eb5e52957..745edda0b0 100644 --- a/indexer/services/ender/src/scripts/dydx_liquidation_fill_handler_per_order.sql +++ b/indexer/services/ender/src/scripts/dydx_liquidation_fill_handler_per_order.sql @@ -119,7 +119,7 @@ BEGIN IF FOUND THEN order_record."totalFilled" = total_filled; - order_record."status" = dydx_get_order_status(total_filled, order_record.size, false, order_record."orderFlags", order_record."timeInForce"); + order_record."status" = dydx_get_order_status(total_filled, order_record.size, 'NOT_CANCELED', order_record."orderFlags", order_record."timeInForce"); UPDATE orders SET @@ -145,7 +145,7 @@ BEGIN order_record."type" = 'LIMIT'; order_record."totalFilled" = fill_amount; - order_record."status" = dydx_get_order_status(fill_amount, order_size, false, order_record."orderFlags", order_record."timeInForce"); + order_record."status" = dydx_get_order_status(fill_amount, order_size, 'NOT_CANCELED', order_record."orderFlags", order_record."timeInForce"); order_record."createdAtHeight" = block_height; INSERT INTO orders ("id", "subaccountId", "clientId", "clobPairId", "side", "size", "totalFilled", "price", "type",