diff --git a/staking-dashboard/src/components/ATPStakingCard/ATPStakingCard.tsx b/staking-dashboard/src/components/ATPStakingCard/ATPStakingCard.tsx index f02b094ab..327b5ea62 100644 --- a/staking-dashboard/src/components/ATPStakingCard/ATPStakingCard.tsx +++ b/staking-dashboard/src/components/ATPStakingCard/ATPStakingCard.tsx @@ -15,7 +15,7 @@ import { useRollupData } from "@/hooks/rollup/useRollupData"; import { useStakerBalance } from "@/hooks/staker/useStakerBalance"; import { useNCStakerStatus } from "@/hooks/staker/useNCStakerStatus"; import { useBlockTimestamp } from "@/hooks/useBlockTimestamp"; -import { usePendingWithdrawals } from "@/hooks/governance"; +import { usePendingWithdrawals, useUserGovernancePower } from "@/hooks/governance"; import { ExternalGovernanceModal } from "@/components/ExternalGovernanceModal"; import { useTransactionCart } from "@/contexts/TransactionCartContext"; import { @@ -201,6 +201,22 @@ export const ATPStakingCard = ({ (sum, w) => sum + w.amount, 0n ); + // Active governance voting power held by this vault's staker — tokens + // the operator (or beneficiary) explicitly deposited into the Governance + // contract, separate from any sequencer-stake delegation. This dashboard + // doesn't offer governance actions (vote, deposit, withdraw-from-gov); + // users must use the Aztec governance dashboard for those, so we surface + // a banner whenever this is non-zero so operators know to look there. + const { votingPower: stakerGovernancePower } = useUserGovernancePower({ + stakerAddress: data.staker as Address | undefined, + }); + const activeGovernanceAmount = + stakerGovernancePower.stakerPowers[0]?.power ?? 0n; + // Combined "tokens currently in governance" for this vault. Both active + // voting power and in-flight withdrawals from governance are tokens + // outside the sequencer-stake path that this dashboard can't act on. + const governanceTotalAmount = activeGovernanceAmount + pendingGovernanceAmount; + const hasGovernanceAllocation = governanceTotalAmount > 0n; const [isGovernanceModalOpen, setIsGovernanceModalOpen] = useState(false); const globalLockTimeDisplay = getTimeToClaimForATP(data, blockTimestamp); @@ -555,6 +571,51 @@ export const ATPStakingCard = ({ + {/* Governance allocation warning. Surfaces both active voting + power and pending governance withdrawals — neither path is + actionable from this dashboard. The button opens the same + external-frontends modal the Navbar's Governance button does. */} + {hasGovernanceAllocation && ( +
- Generate your validator BLS keys + Generate your sequencer BLS keys
- Register Validator + Register Sequencer diff --git a/staking-dashboard/src/components/Stake/StakeFlowAtpSelection.tsx b/staking-dashboard/src/components/Stake/StakeFlowAtpSelection.tsx index e67fe447f..0dd4c7bff 100644 --- a/staking-dashboard/src/components/Stake/StakeFlowAtpSelection.tsx +++ b/staking-dashboard/src/components/Stake/StakeFlowAtpSelection.tsx @@ -262,7 +262,7 @@ export const StakeFlowAtpSelection = ({ columns = 3, itemsPerPage: customItemsPe{isError ? "Please try again or check your connection" - : "You need to have Token Vaults to register as a validator" + : "You need to have Token Vaults to register as a sequencer" }
diff --git a/staking-dashboard/src/components/StakeMethodSelectionModal/StakeMethodSelectionModal.tsx b/staking-dashboard/src/components/StakeMethodSelectionModal/StakeMethodSelectionModal.tsx index 55c2e0b90..16d947fe3 100644 --- a/staking-dashboard/src/components/StakeMethodSelectionModal/StakeMethodSelectionModal.tsx +++ b/staking-dashboard/src/components/StakeMethodSelectionModal/StakeMethodSelectionModal.tsx @@ -53,13 +53,13 @@ export default function StakeMethodSelectionModal({ >Register as an operator if you're already running your own - validator and want others to delegate to you. + sequencer and want others to delegate to you.
- Follow these steps to register and stake with your validator node + Follow these steps to register and stake with your sequencer node
Connect your wallet to register as a validator
+Connect your wallet to register as a sequencer