From 0d81a88e3a5b40f4fdce41fca263bf6091d62c4b Mon Sep 17 00:00:00 2001 From: mulan xia Date: Mon, 22 Apr 2024 17:29:05 -0400 Subject: [PATCH] lint line length --- .../state/manager/StateManagerAdaptor.kt | 11 ++++++++--- .../state/v2/supervisor/SubaccountSupervisor.kt | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/StateManagerAdaptor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/StateManagerAdaptor.kt index bf562fbf8..6c7e1266e 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/StateManagerAdaptor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/StateManagerAdaptor.kt @@ -1802,11 +1802,16 @@ open class StateManagerAdaptor( val reduceOnly = true val postOnly = false - val timeInForce = null; // TP/SL orders always have a null timeInForce. IOC/FOK/PostOnly/GTD is distinguished by the execution field. + // TP/SL orders always have a null timeInForce. IOC/FOK/PostOnly/GTD is distinguished by the execution field. + val timeInForce = null; + /** + * TP/SL market orders default to IOC execution. + * TP/SL limit orders default to GTD (default) execution. + */ val execution = when (triggerOrder.type) { - OrderType.stopMarket, OrderType.takeProfitMarket -> "IOC" // All TP/SL market orders currently default to IOC execution. - OrderType.stopLimit, OrderType.takeProfitLimit -> "DEFAULT" // All TP/SL limit orders currently default to GTD (default) execution. + OrderType.stopMarket, OrderType.takeProfitMarket -> "IOC" + OrderType.stopLimit, OrderType.takeProfitLimit -> "DEFAULT" else -> throw Exception("invalid triggerOrderType") } diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/SubaccountSupervisor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/SubaccountSupervisor.kt index daf965cc2..e0a1e39e6 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/SubaccountSupervisor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/v2/supervisor/SubaccountSupervisor.kt @@ -903,11 +903,16 @@ internal class SubaccountSupervisor( val reduceOnly = true val postOnly = false - val timeInForce = null; // TP/SL orders always have a null timeInForce. IOC/FOK/PostOnly/GTD is distinguished by the execution field. + // TP/SL orders always have a null timeInForce. IOC/FOK/PostOnly/GTD is distinguished by the execution field. + val timeInForce = null; + /** + * TP/SL market orders default to IOC execution. + * TP/SL limit orders default to GTD (default) execution. + */ val execution = when (triggerOrder.type) { - OrderType.stopMarket, OrderType.takeProfitMarket -> "IOC" // All TP/SL market orders currently default to IOC execution. - OrderType.stopLimit, OrderType.takeProfitLimit -> "DEFAULT" // All TP/SL limit orders currently default to GTD (default) execution. + OrderType.stopMarket, OrderType.takeProfitMarket -> "IOC" + OrderType.stopLimit, OrderType.takeProfitLimit -> "DEFAULT" else -> throw Exception("invalid triggerOrderType") }