Skip to content

Commit

Permalink
Define dedicated flag for deposit cap (#939)
Browse files Browse the repository at this point in the history
We want to have a dedicated flag (separate from the TVL component) to
decide if we want to show the message about the deposit cap and disable
the deposit button.
  • Loading branch information
nkuba authored Feb 19, 2025
2 parents 949e3d9 + 474d356 commit 2078d33
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions dapp/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ VITE_FEATURE_FLAG_OKX_WALLET_ENABLED="true"
VITE_FEATURE_FLAG_XVERSE_WALLET_ENABLED="true"
VITE_FEATURE_FLAG_ACRE_POINTS_ENABLED="true"
VITE_FEATURE_FLAG_TVL_ENABLED="true"
VITE_FEATURE_FLAG_DEPOSIT_CAP_ENABLED="true"
VITE_FEATURE_GATING_DAPP_ENABLED="true"
VITE_FEATURE_POSTHOG_ENABLED="false"
VITE_FEATURE_MOBILE_MODE_ENABLED="true"
4 changes: 4 additions & 0 deletions dapp/src/constants/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const ACRE_POINTS_ENABLED =

const TVL_ENABLED = import.meta.env.VITE_FEATURE_FLAG_TVL_ENABLED === "true"

const DEPOSIT_CAP_ENABLED =
import.meta.env.VITE_FEATURE_DEPOSIT_CAP_ENABLED === "true"

const GATING_DAPP_ENABLED =
import.meta.env.VITE_FEATURE_GATING_DAPP_ENABLED === "true"

Expand All @@ -26,6 +29,7 @@ const featureFlags = {
WITHDRAWALS_ENABLED,
ACRE_POINTS_ENABLED,
TVL_ENABLED,
DEPOSIT_CAP_ENABLED,
GATING_DAPP_ENABLED,
POSTHOG_ENABLED,
MOBILE_MODE_ENABLED,
Expand Down
4 changes: 2 additions & 2 deletions dapp/src/pages/DashboardPage/PositionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default function PositionDetails() {
{...buttonStyles}
onClick={openDepositModal}
isDisabled={
(featureFlags.TVL_ENABLED && tvl.isCapExceeded) ||
(featureFlags.DEPOSIT_CAP_ENABLED && tvl.isCapExceeded) ||
isDisabledForMobileMode
}
>
Expand Down Expand Up @@ -130,7 +130,7 @@ export default function PositionDetails() {
</ArrivingSoonTooltip>
</UserDataSkeleton>
)}
{featureFlags.TVL_ENABLED && <AcreTVLMessage />}
{featureFlags.DEPOSIT_CAP_ENABLED && <AcreTVLMessage />}
</HStack>
</Flex>
)
Expand Down

0 comments on commit 2078d33

Please sign in to comment.