Skip to content

Commit

Permalink
add isSlTpEnabled feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-dydx committed Apr 26, 2024
1 parent 0480274 commit 76656df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ data class EnvironmentFeatureFlags(
val usePessimisticCollateralCheck: Boolean,
val useOptimisticCollateralCheck: Boolean,
val withdrawalSafetyEnabled: Boolean,
val isSlTpEnabled: Boolean,
) {
companion object {
fun parse(
Expand All @@ -115,12 +116,14 @@ data class EnvironmentFeatureFlags(
val usePessimisticCollateralCheck = parser.asBool(data?.get("usePessimisticCollateralCheck")) ?: false
val useOptimisticCollateralCheck = parser.asBool(data?.get("useOptimisticCollateralCheck")) ?: false
val withdrawalSafetyEnabled = parser.asBool(data?.get("withdrawalSafetyEnabled")) ?: false
val isSlTpEnabled = parser.asBool(data?.get("isSlTpEnabled")) ?: false

return EnvironmentFeatureFlags(
reduceOnlySupported,
usePessimisticCollateralCheck,
useOptimisticCollateralCheck,
withdrawalSafetyEnabled,
isSlTpEnabled
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class AbacusMockData {
usePessimisticCollateralCheck = false,
useOptimisticCollateralCheck = true,
withdrawalSafetyEnabled = true,
isSlTpEnabled = true,
),
)
}

0 comments on commit 76656df

Please sign in to comment.