Skip to content

Commit

Permalink
fix user canceled logic
Browse files Browse the repository at this point in the history
  • Loading branch information
aforaleka committed Jun 17, 2024
1 parent 738682e commit 8f32396
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 8f32396

Please sign in to comment.