From ceb1d48ac71c0c367a18c5668633890075ad7de7 Mon Sep 17 00:00:00 2001 From: aforaleka Date: Mon, 17 Jun 2024 19:24:36 -0400 Subject: [PATCH] fix unnecessary cancel order param --- .../state/manager/AsyncAbacusStateManagerProtocol.kt | 2 +- .../state/v2/manager/AsyncAbacusStateManagerV2.kt | 4 ++-- .../state/v2/manager/StateManagerAdaptorV2.kt | 4 ++-- .../state/v2/supervisor/AccountSupervisor.kt | 4 ++-- .../state/v2/supervisor/AccountsSupervisor.kt | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/AsyncAbacusStateManagerProtocol.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/AsyncAbacusStateManagerProtocol.kt index 3524986e4..d93103864 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/AsyncAbacusStateManagerProtocol.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/AsyncAbacusStateManagerProtocol.kt @@ -79,7 +79,7 @@ interface AsyncAbacusStateManagerProtocol { // Commit changes with params fun faucet(amount: Double, callback: TransactionCallback) - fun cancelOrder(orderId: String, callback: TransactionCallback, isOrphanedTriggerOrder: Boolean) + fun cancelOrder(orderId: String, callback: TransactionCallback) // Bridge functions. // If client is not using cancelOrder function, it should call orderCanceled function with diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/manager/AsyncAbacusStateManagerV2.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/manager/AsyncAbacusStateManagerV2.kt index 3f21874eb..60017b739 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/manager/AsyncAbacusStateManagerV2.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/manager/AsyncAbacusStateManagerV2.kt @@ -592,9 +592,9 @@ class AsyncAbacusStateManagerV2( } } - override fun cancelOrder(orderId: String, callback: TransactionCallback, isOrphanedTriggerOrder: Boolean) { + override fun cancelOrder(orderId: String, callback: TransactionCallback) { try { - adaptor?.cancelOrder(orderId, callback, isOrphanedTriggerOrder) + adaptor?.cancelOrder(orderId, callback) } catch (e: Exception) { val error = V4TransactionErrors.error(null, e.toString()) callback(false, error, null) diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/manager/StateManagerAdaptorV2.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/manager/StateManagerAdaptorV2.kt index 07d0821a5..73119fe49 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/manager/StateManagerAdaptorV2.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/manager/StateManagerAdaptorV2.kt @@ -581,8 +581,8 @@ internal class StateManagerAdaptorV2( accounts.stopWatchingLastOrder() } - internal fun cancelOrder(orderId: String, callback: TransactionCallback, isOrphanedTriggerOrder: Boolean) { - accounts.cancelOrder(orderId, callback, isOrphanedTriggerOrder) + internal fun cancelOrder(orderId: String, callback: TransactionCallback) { + accounts.cancelOrder(orderId, callback) } internal fun orderCanceled(orderId: String) { diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/AccountSupervisor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/AccountSupervisor.kt index ce91b267c..90e5ab7c0 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/AccountSupervisor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/AccountSupervisor.kt @@ -1121,8 +1121,8 @@ internal fun AccountSupervisor.faucet(amount: Double, callback: TransactionCallb subaccount?.faucet(amount, callback) } -internal fun AccountSupervisor.cancelOrder(orderId: String, callback: TransactionCallback, isOrphanedTriggerOrder: Boolean) { - subaccount?.cancelOrder(orderId, callback, isOrphanedTriggerOrder) +internal fun AccountSupervisor.cancelOrder(orderId: String, callback: TransactionCallback) { + subaccount?.cancelOrder(orderId, callback) } internal fun AccountSupervisor.orderCanceled(orderId: String) { diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/AccountsSupervisor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/AccountsSupervisor.kt index 219ecebeb..7d94d9ab7 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/AccountsSupervisor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/AccountsSupervisor.kt @@ -333,8 +333,8 @@ internal fun AccountsSupervisor.faucet(amount: Double, callback: TransactionCall account?.faucet(amount, callback) } -internal fun AccountsSupervisor.cancelOrder(orderId: String, callback: TransactionCallback, isOrphanedTriggerOrder: Boolean) { - account?.cancelOrder(orderId, callback, isOrphanedTriggerOrder) +internal fun AccountsSupervisor.cancelOrder(orderId: String, callback: TransactionCallback) { + account?.cancelOrder(orderId, callback) } internal fun AccountsSupervisor.orderCanceled(orderId: String) {