From 8f3239653b8899ce588823b6147de14f16834642 Mon Sep 17 00:00:00 2001 From: aforaleka Date: Mon, 17 Jun 2024 13:46:24 -0400 Subject: [PATCH] fix user canceled logic --- .../processor/wallet/account/OrderProcessor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/wallet/account/OrderProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/wallet/account/OrderProcessor.kt index a1345538f..7d1ba9c65 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/wallet/account/OrderProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/wallet/account/OrderProcessor.kt @@ -229,7 +229,7 @@ internal class OrderProcessor(parser: ParserProtocol) : BaseProcessor(parser) { // if order is short-term order and indexer returns best effort canceled and has no partial fill // treat as a pending order until it's partially filled or finalized val isBestEffortCanceled = modified["status"] == "BEST_EFFORT_CANCELED" - val isNotUserCanceled = modified["cancelReason"] != "USER_CANCELED" + val isNotUserCanceled = modified["cancelReason"] != "USER_CANCELED" && modified["cancelReason"] != "ORDER_REMOVAL_REASON_USER_CANCELED" if (orderFlags.equals(Numeric.double.ZERO) && isBestEffortCanceled && isNotUserCanceled) { modified.safeSet("status", "PENDING") }