From 5921bda8793cab70758de3ec088c0608b64e7886 Mon Sep 17 00:00:00 2001 From: Amin Sammara Date: Fri, 27 Nov 2026 15:09:04 +0900 Subject: [PATCH] fix: show the staking-required alert only for NCATPs Only NCATPs must stake before they can withdraw. The alert excluded a list of insider registries instead, so investor LATPs from the investor registry could still trigger it. Gate it on the ATP type. --- .../WalletConnectionAlert/WalletConnectionAlertModal.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/staking-dashboard/src/components/WalletConnectionAlert/WalletConnectionAlertModal.tsx b/staking-dashboard/src/components/WalletConnectionAlert/WalletConnectionAlertModal.tsx index 18291f1ca..dc51b1d26 100644 --- a/staking-dashboard/src/components/WalletConnectionAlert/WalletConnectionAlertModal.tsx +++ b/staking-dashboard/src/components/WalletConnectionAlert/WalletConnectionAlertModal.tsx @@ -7,15 +7,14 @@ import { useStakingAssetTokenDetails } from "@/hooks/stakingRegistry" import { Icon } from "@/components/Icon" import { useMultipleStakeableAmounts } from "@/hooks/atp" import { formatTokenAmount } from "@/utils/atpFormatters" -import { isInsiderAtp } from "@/utils/insiderAtp" interface WalletConnectionAlertModalProps { isSafeWarningShown: boolean } /** - * Alert modal that appears when user connects wallet and has ATPs with balance > ACTIVATION_THRESHOLD - * ATPs from the insider registries are ignored, since they can withdraw without staking + * Alert modal that appears when user connects wallet and has NCATPs with balance > ACTIVATION_THRESHOLD + * Only NCATPs must stake before withdrawing; LATPs and MATPs can claim without staking, so they are ignored * Warns users that they must stake and cannot withdraw unless they stake * Shows after SafeWarningModal is dismissed */ @@ -48,9 +47,9 @@ export const WalletConnectionAlertModal = ({ isSafeWarningShown }: WalletConnect return } - // Check if any ATP has allocation > activation threshold + // Only NCATPs have to stake before they can withdraw const hasAtpAboveThreshold = stakeableAtps - .filter((atp) => !isInsiderAtp(atp.registry)) + .filter((atp) => atp.typeString === "NCATP") .reduce((a, b) => a + Number(b.stakeableAmount), 0) >= activationThreshold if (hasAtpAboveThreshold && storageKey) {