From 329644ff7e09e3e11b2a84ce05e45fc8df4cfa1e Mon Sep 17 00:00:00 2001 From: Kamil Pyszkowski Date: Mon, 4 Nov 2024 14:39:40 +0100 Subject: [PATCH] Implement deposit limit when the TVL cap exceeds --- .../pages/DashboardPage/PositionDetails.tsx | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/dapp/src/pages/DashboardPage/PositionDetails.tsx b/dapp/src/pages/DashboardPage/PositionDetails.tsx index 0c9d6c2b8..02221c83b 100644 --- a/dapp/src/pages/DashboardPage/PositionDetails.tsx +++ b/dapp/src/pages/DashboardPage/PositionDetails.tsx @@ -4,6 +4,7 @@ import { useAllActivitiesCount, useBitcoinPosition, useTransactionModal, + useTVL, } from "#/hooks" import { ACTION_FLOW_TYPES } from "#/types" import { @@ -18,6 +19,7 @@ import ArrivingSoonTooltip from "#/components/ArrivingSoonTooltip" import UserDataSkeleton from "#/components/shared/UserDataSkeleton" import { featureFlags } from "#/constants" import { TextMd } from "#/components/shared/Typography" +import { BoltFilled } from "#/assets/icons" const isWithdrawalFlowEnabled = featureFlags.WITHDRAWALS_ENABLED @@ -39,6 +41,8 @@ export default function PositionDetails() { const openWithdrawModal = useTransactionModal(ACTION_FLOW_TYPES.UNSTAKE) const activitiesCount = useAllActivitiesCount() + const { isCapExceeded } = useTVL() + return ( @@ -83,7 +87,11 @@ export default function PositionDetails() { - @@ -99,6 +107,17 @@ export default function PositionDetails() { + {isCapExceeded && ( + + + + Deposit cap reached! + + Stay tuned for the next deposit cycle. + + + + )} )