diff --git a/dapp/src/pages/DashboardPage/AcreTVLMessage.tsx b/dapp/src/pages/DashboardPage/AcreTVLMessage.tsx index 70e257524..c15981569 100644 --- a/dapp/src/pages/DashboardPage/AcreTVLMessage.tsx +++ b/dapp/src/pages/DashboardPage/AcreTVLMessage.tsx @@ -1,6 +1,6 @@ import React from "react" import { Box, HStack, StackProps, VStack } from "@chakra-ui/react" -import { useStatistics } from "#/hooks" +import { useAllActivitiesCount, useStatistics, useWallet } from "#/hooks" import { BoltFilled } from "#/assets/icons" import { TextMd } from "#/components/shared/Typography" import { CurrencyBalance } from "#/components/shared/CurrencyBalance" @@ -9,13 +9,24 @@ type AcreTVLMessageProps = Omit export default function AcreTVLMessage(props: AcreTVLMessageProps) { const { tvl } = useStatistics() + const { address } = useWallet() + const activitiesCount = useAllActivitiesCount() + + const isWalletConnected = !!address + const isFirstTimeUser = activitiesCount === 0 + + if (isWalletConnected && !isFirstTimeUser && !tvl.isCapExceeded) { + return null + } return ( - + {tvl.isCapExceeded ? ( - Deposit cap reached! + + Deposit cap reached! + Stay tuned for the next deposit cycle. ) : ( diff --git a/dapp/src/pages/DashboardPage/PositionDetails.tsx b/dapp/src/pages/DashboardPage/PositionDetails.tsx index 208b5c95e..85b65313c 100644 --- a/dapp/src/pages/DashboardPage/PositionDetails.tsx +++ b/dapp/src/pages/DashboardPage/PositionDetails.tsx @@ -5,6 +5,7 @@ import { useBitcoinPosition, useTransactionModal, useStatistics, + useWallet, } from "#/hooks" import { ACTION_FLOW_TYPES } from "#/types" import { @@ -43,6 +44,9 @@ export default function PositionDetails() { const { tvl } = useStatistics() + const { address } = useWallet() + const isWalletConnected = !!address + return ( @@ -85,7 +89,7 @@ export default function PositionDetails() { - + - - + + + + )}