From 539dc8e8fb3869e966dfd129bb122484e5ae5424 Mon Sep 17 00:00:00 2001 From: mike-dydx Date: Fri, 26 Apr 2024 14:57:26 -0400 Subject: [PATCH] add isSlTpLimitOrdersEnabled --- .../kotlin/exchange.dydx.abacus/state/manager/Enviroment.kt | 3 +++ .../exchange.dydx.abacus/tests/payloads/AbacusMockData.kt | 1 + 2 files changed, 4 insertions(+) diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/Enviroment.kt b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/Enviroment.kt index 3f5f9553c..abc603589 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/Enviroment.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/state/manager/Enviroment.kt @@ -106,6 +106,7 @@ data class EnvironmentFeatureFlags( val useOptimisticCollateralCheck: Boolean, val withdrawalSafetyEnabled: Boolean, val isSlTpEnabled: Boolean, + val isSlTpLimitOrdersEnabled: Boolean, ) { companion object { fun parse( @@ -117,6 +118,7 @@ data class EnvironmentFeatureFlags( val useOptimisticCollateralCheck = parser.asBool(data?.get("useOptimisticCollateralCheck")) ?: false val withdrawalSafetyEnabled = parser.asBool(data?.get("withdrawalSafetyEnabled")) ?: false val isSlTpEnabled = parser.asBool(data?.get("isSlTpEnabled")) ?: false + val isSlTpLimitOrdersEnabled = parser.asBool(data?.get("isSlTpLimitOrdersEnabled")) ?: false return EnvironmentFeatureFlags( reduceOnlySupported, @@ -124,6 +126,7 @@ data class EnvironmentFeatureFlags( useOptimisticCollateralCheck, withdrawalSafetyEnabled, isSlTpEnabled, + isSlTpLimitOrdersEnabled, ) } } diff --git a/src/commonTest/kotlin/exchange.dydx.abacus/tests/payloads/AbacusMockData.kt b/src/commonTest/kotlin/exchange.dydx.abacus/tests/payloads/AbacusMockData.kt index 1a6cf879b..f04ed68c4 100644 --- a/src/commonTest/kotlin/exchange.dydx.abacus/tests/payloads/AbacusMockData.kt +++ b/src/commonTest/kotlin/exchange.dydx.abacus/tests/payloads/AbacusMockData.kt @@ -108,6 +108,7 @@ class AbacusMockData { useOptimisticCollateralCheck = true, withdrawalSafetyEnabled = true, isSlTpEnabled = true, + isSlTpLimitOrdersEnabled = true, ), ) }