Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(sltp): update sltp/sltplimit to be flagged behind env.json instead of url params + enable sltp in all environments #467

Merged
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"@cosmjs/proto-signing": "^0.32.1",
"@cosmjs/stargate": "^0.32.1",
"@cosmjs/tendermint-rpc": "^0.32.1",
"@dydxprotocol/v4-abacus": "^1.6.48",
"@dydxprotocol/v4-abacus": "^1.6.50",
"@dydxprotocol/v4-client-js": "^1.1.7",
"@dydxprotocol/v4-localization": "^1.1.71",
"@dydxprotocol/v4-localization": "^1.1.74",
"@ethersproject/providers": "^5.7.2",
"@js-joda/core": "^5.5.3",
"@privy-io/react-auth": "^1.59.7",
Expand Down
22 changes: 8 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 45 additions & 15 deletions public/configs/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-dev-2": {
Expand Down Expand Up @@ -216,7 +218,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-dev-4": {
Expand Down Expand Up @@ -304,7 +308,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-dev-5": {
Expand Down Expand Up @@ -391,7 +397,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-staging": {
Expand Down Expand Up @@ -480,7 +488,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-staging-forced-update": {
Expand Down Expand Up @@ -567,7 +577,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-staging-west": {
Expand Down Expand Up @@ -656,7 +668,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet": {
Expand Down Expand Up @@ -749,7 +763,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet-dydx": {
Expand Down Expand Up @@ -839,7 +855,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet-nodefleet": {
Expand Down Expand Up @@ -929,7 +947,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet-kingnodes": {
Expand Down Expand Up @@ -1019,7 +1039,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet-liquify": {
Expand Down Expand Up @@ -1109,7 +1131,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet-polkachu": {
Expand Down Expand Up @@ -1190,7 +1214,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet-bware": {
Expand Down Expand Up @@ -1280,7 +1306,9 @@
"featureFlags": {
"reduceOnlySupported": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-mainnet": {
Expand Down Expand Up @@ -1369,7 +1397,9 @@
},
"featureFlags": {
"reduceOnlySupported": false,
"withdrawalSafetyEnabled": false
"withdrawalSafetyEnabled": false,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
}
}
Expand Down
60 changes: 45 additions & 15 deletions public/configs/v1/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@
"usePessimisticCollateralCheck": false,
"useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-dev-2": {
Expand Down Expand Up @@ -300,7 +302,9 @@
"usePessimisticCollateralCheck": false,
"useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-dev-4": {
Expand Down Expand Up @@ -330,7 +334,9 @@
"usePessimisticCollateralCheck": false,
"useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-dev-5": {
Expand Down Expand Up @@ -359,7 +365,9 @@
"usePessimisticCollateralCheck": false,
"useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-staging": {
Expand Down Expand Up @@ -389,7 +397,9 @@
"usePessimisticCollateralCheck": false,
"useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-staging-forced-update": {
Expand Down Expand Up @@ -426,7 +436,9 @@
"usePessimisticCollateralCheck": false,
"useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-staging-west": {
Expand Down Expand Up @@ -456,7 +468,9 @@
"usePessimisticCollateralCheck": false,
"useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet": {
Expand Down Expand Up @@ -490,7 +504,9 @@
"usePessimisticCollateralCheck": false,
"useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet-dydx": {
Expand Down Expand Up @@ -519,7 +535,9 @@
"reduceOnlySupported": true,
"usePessimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet-nodefleet": {
Expand Down Expand Up @@ -549,7 +567,9 @@
"usePessimisticCollateralCheck": false,
"useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet-kingnodes": {
Expand Down Expand Up @@ -578,7 +598,9 @@
"reduceOnlySupported": true,
"usePessimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet-liquify": {
Expand Down Expand Up @@ -608,7 +630,9 @@
"usePessimisticCollateralCheck": false,
"useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet-polkachu": {
Expand Down Expand Up @@ -638,7 +662,9 @@
"usePessimisticCollateralCheck": false,
"useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-testnet-bware": {
Expand Down Expand Up @@ -668,7 +694,9 @@
"usePessimisticCollateralCheck": false,
"useOptimisticCollateralCheck": true,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
},
"dydxprotocol-mainnet": {
Expand Down Expand Up @@ -698,7 +726,9 @@
"usePessimisticCollateralCheck": true,
"useOptimisticCollateralCheck": false,
"withdrawalSafetyEnabled": true,
"CCTPWithdrawalOnly": true
"CCTPWithdrawalOnly": true,
"isSlTpEnabled": true,
"isSlTpLimitOrdersEnabled": false
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/useEnvFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export interface EnvironmentFeatures {
reduceOnlySupported: boolean;
withdrawalSafetyEnabled: boolean;
CCTPWithdrawalOnly: boolean;
isSlTpEnabled: boolean;
isSlTpLimitOrdersEnabled: boolean;
}

export const useEnvFeatures = (): EnvironmentFeatures => {
Expand Down
Loading
Loading