Skip to content

Commit

Permalink
fix: trigger cancels when markets is slow (#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleroooo authored Nov 12, 2024
1 parent 2df8fb5 commit c898ac5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ allprojects {
}

group = "exchange.dydx.abacus"
version = "1.13.22"
version = "1.13.23"

repositories {
google()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ internal class SubaccountTransactionSupervisor(

internal fun cancelTriggerOrdersWithClosedOrFlippedPositions() {
val subaccount = stateMachine.state?.subaccount(subaccountNumber) ?: return
if (stateMachine.state?.marketsSummary?.marketIds().isNullOrEmpty()) return

val cancelableTriggerOrders = subaccount.orders?.filter { order ->
val isConditionalOrder = order.orderFlags == CONDITIONAL_ORDER_FLAGS
val isReduceOnly = order.reduceOnly
Expand Down
2 changes: 1 addition & 1 deletion v4_abacus.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'v4_abacus'
spec.version = '1.13.22'
spec.version = '1.13.23'
spec.homepage = 'https://github.com/dydxprotocol/v4-abacus'
spec.source = { :http=> ''}
spec.authors = ''
Expand Down

0 comments on commit c898ac5

Please sign in to comment.