Skip to content

Commit

Permalink
fix unnecessary cancel order param
Browse files Browse the repository at this point in the history
  • Loading branch information
aforaleka committed Jun 17, 2024
1 parent 29ba646 commit ceb1d48
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ceb1d48

Please sign in to comment.