Skip to content

Commit

Permalink
Define dedicated flag for deposit cap
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 committed Feb 19, 2025
1 parent 949e3d9 commit eda1990
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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 eda1990

Please sign in to comment.