From 888bfedbb222041d45b4bde229506d32a36365e3 Mon Sep 17 00:00:00 2001 From: Koen Date: Tue, 19 May 2026 15:55:06 +0400 Subject: [PATCH] chore: add warning for governance & sequencer name --- .../ATPStakingCard/ATPStakingCard.tsx | 63 ++++++++++++++++++- .../ValidatorStatsDisplay.tsx | 10 +-- .../components/HeroSection/HeroSection.tsx | 2 +- .../Provider/ProviderSequencerList.tsx | 2 +- .../Registration/RegistrationPreInfo.tsx | 2 +- .../Registration/RegistrationUploadKeys.tsx | 2 +- .../src/components/Sidebar/Sidebar.tsx | 2 +- .../Stake/StakeFlowAtpSelection.tsx | 2 +- .../StakeMethodSelectionModal.tsx | 6 +- .../StakingChoiceModal/StakingChoiceModal.tsx | 2 +- .../src/components/StatsGrid/StatCard.tsx | 2 +- .../StepSetValidatorAddress.tsx | 4 +- .../StepUploadKeys/StepUploadKeys.tsx | 4 +- .../Providers/StakingProviderDetailPage.tsx | 4 +- .../ValidatorRegistration.tsx | 8 +-- staking-dashboard/src/utils/stakingSteps.ts | 4 +- 16 files changed, 90 insertions(+), 29 deletions(-) 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 && ( +
+ +
+
+ Tokens in Governance +
+
+ This Token Vault has{" "} + + {formatTokenAmount(governanceTotalAmount, decimals, symbol)} + {" "} + allocated to the Governance contract + {pendingGovernanceAmount > 0n && activeGovernanceAmount > 0n && ( + <> + {" "} + ({formatTokenAmount(activeGovernanceAmount, decimals, symbol)}{" "} + active voting power,{" "} + {formatTokenAmount(pendingGovernanceAmount, decimals, symbol)}{" "} + pending withdrawal) + + )} + . These tokens are separate from sequencer stake and can't be + voted, withdrawn, or finalized from this dashboard — use the + Aztec governance dashboard to manage them. +
+ +
+
+ )} + {/* Total Funds - Full Width */}
diff --git a/staking-dashboard/src/components/ATPStakingOverview/ValidatorStatsDisplay.tsx b/staking-dashboard/src/components/ATPStakingOverview/ValidatorStatsDisplay.tsx index ab805563e..ab6182e2f 100644 --- a/staking-dashboard/src/components/ATPStakingOverview/ValidatorStatsDisplay.tsx +++ b/staking-dashboard/src/components/ATPStakingOverview/ValidatorStatsDisplay.tsx @@ -42,7 +42,7 @@ export const ValidatorStatsDisplay = ({
- Validator Capacity + Sequencer Capacity
{stakeableAtps.length > 1 && ( @@ -62,7 +62,7 @@ export const ValidatorStatsDisplay = ({
-
Total Validators
+
Total Sequencers
{totalValidatorCount}
@@ -76,7 +76,7 @@ export const ValidatorStatsDisplay = ({
- Each validator requires {formatTokenAmount(activationThreshold, decimals, symbol)} minimum stake + Each sequencer requires {formatTokenAmount(activationThreshold, decimals, symbol)} minimum stake
{/* ATP Breakdown */} @@ -86,7 +86,7 @@ export const ValidatorStatsDisplay = ({ By Token Vault
{sortedStakeableAtps.map((atp) => { - const atpValidators = activationThreshold && atp.stakeableAmount + const atpSequencers = activationThreshold && atp.stakeableAmount ? Number(atp.stakeableAmount / activationThreshold) : 0 const displayNumber = atp.sequentialNumber || '?' @@ -101,7 +101,7 @@ export const ValidatorStatsDisplay = ({ {formatTokenAmount(atp.stakeableAmount || 0n, decimals, symbol)} - {atpValidators} validator{atpValidators !== 1 ? 's' : ''} + {atpSequencers} sequencer{atpSequencers !== 1 ? 's' : ''}
diff --git a/staking-dashboard/src/components/HeroSection/HeroSection.tsx b/staking-dashboard/src/components/HeroSection/HeroSection.tsx index c4abf16b9..a4af249aa 100644 --- a/staking-dashboard/src/components/HeroSection/HeroSection.tsx +++ b/staking-dashboard/src/components/HeroSection/HeroSection.tsx @@ -118,7 +118,7 @@ export const HeroSection = () => { ? "Does not include queued attesters. Includes sequencers who initiated exits but have not yet finalized." : stat.title === "Minimum Stake Required" ? "The minimum amount of tokens required to create a single stake position" - : "Total tokens distributed as rewards to all validators." + : "Total tokens distributed as rewards to all sequencers." } size="md" maxWidth="max-w-sm" diff --git a/staking-dashboard/src/components/Provider/ProviderSequencerList.tsx b/staking-dashboard/src/components/Provider/ProviderSequencerList.tsx index 58198264b..a8caa60ad 100644 --- a/staking-dashboard/src/components/Provider/ProviderSequencerList.tsx +++ b/staking-dashboard/src/components/Provider/ProviderSequencerList.tsx @@ -165,7 +165,7 @@ export const ProviderSequencerList = ({ stakes }: ProviderSequencerListProps) => target="_blank" rel="noopener noreferrer" className="text-parchment/60 hover:text-chartreuse transition-colors flex-shrink-0" - title="View in validator dashboard" + title="View in sequencer dashboard" > diff --git a/staking-dashboard/src/components/Registration/RegistrationPreInfo.tsx b/staking-dashboard/src/components/Registration/RegistrationPreInfo.tsx index ec25079a4..8e464545c 100644 --- a/staking-dashboard/src/components/Registration/RegistrationPreInfo.tsx +++ b/staking-dashboard/src/components/Registration/RegistrationPreInfo.tsx @@ -38,7 +38,7 @@ export const RegistrationPreInfo = ({ onStartRegistration }: RegistrationPreInfo
Sequencer keystores
-
Validator key files ready to upload
+
Sequencer key files ready to upload
diff --git a/staking-dashboard/src/components/Registration/RegistrationUploadKeys.tsx b/staking-dashboard/src/components/Registration/RegistrationUploadKeys.tsx index cc3339b76..1819d3725 100644 --- a/staking-dashboard/src/components/Registration/RegistrationUploadKeys.tsx +++ b/staking-dashboard/src/components/Registration/RegistrationUploadKeys.tsx @@ -213,7 +213,7 @@ export const RegistrationUploadKeys = () => {

- 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 Your Validator

+

Register Your Sequencer

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.

    -
  • Requires running validator infrastructure
  • +
  • Requires running sequencer infrastructure
  • Higher potential rewards
diff --git a/staking-dashboard/src/components/StakingChoiceModal/StakingChoiceModal.tsx b/staking-dashboard/src/components/StakingChoiceModal/StakingChoiceModal.tsx index bbc98bafc..c0d5c2046 100644 --- a/staking-dashboard/src/components/StakingChoiceModal/StakingChoiceModal.tsx +++ b/staking-dashboard/src/components/StakingChoiceModal/StakingChoiceModal.tsx @@ -102,7 +102,7 @@ export const StakingChoiceModal = ({ isOpen, onClose, selectedAtp }: StakingChoi - {/* Register Your Validator Option */} + {/* Register Your Sequencer Option */}
{/* Icon */} diff --git a/staking-dashboard/src/components/StatsGrid/StatCard.tsx b/staking-dashboard/src/components/StatsGrid/StatCard.tsx index 8b888fa9d..dc3fcda31 100644 --- a/staking-dashboard/src/components/StatsGrid/StatCard.tsx +++ b/staking-dashboard/src/components/StatsGrid/StatCard.tsx @@ -25,7 +25,7 @@ export const StatCard = ({ title, value, change, delay }: StatCardProps) => {
- Want to run a validator?{" "} + Want to run a sequencer?{" "} onValidatorRunningChange(e.target.checked)} disabled={!canInput} /> - My validator is up and running + My sequencer is up and running
diff --git a/staking-dashboard/src/components/StepUploadKeys/StepUploadKeys.tsx b/staking-dashboard/src/components/StepUploadKeys/StepUploadKeys.tsx index 939f8dd33..113689f82 100644 --- a/staking-dashboard/src/components/StepUploadKeys/StepUploadKeys.tsx +++ b/staking-dashboard/src/components/StepUploadKeys/StepUploadKeys.tsx @@ -84,7 +84,7 @@ export default function StepUploadKeys({ return (
- Upload your validator keys and provide necessary validator + Upload your sequencer keys and provide necessary sequencer configuration.
@@ -250,7 +250,7 @@ export default function StepUploadKeys({
- Whether validator follows network governance automatically. + Whether sequencer follows network governance automatically.
diff --git a/staking-dashboard/src/pages/Providers/StakingProviderDetailPage.tsx b/staking-dashboard/src/pages/Providers/StakingProviderDetailPage.tsx index f0d009882..ff90396d7 100644 --- a/staking-dashboard/src/pages/Providers/StakingProviderDetailPage.tsx +++ b/staking-dashboard/src/pages/Providers/StakingProviderDetailPage.tsx @@ -40,10 +40,10 @@ export default function StakingProviderDetailPage() {
diff --git a/staking-dashboard/src/pages/RegisterValidator/ValidatorRegistration.tsx b/staking-dashboard/src/pages/RegisterValidator/ValidatorRegistration.tsx index 429a2501d..2f5c1db5b 100644 --- a/staking-dashboard/src/pages/RegisterValidator/ValidatorRegistration.tsx +++ b/staking-dashboard/src/pages/RegisterValidator/ValidatorRegistration.tsx @@ -339,9 +339,9 @@ export default function ValidatorRegistration() {
-

Register your Validator

+

Register your Sequencer

- Follow these steps to register and stake with your validator node + Follow these steps to register and stake with your sequencer node

@@ -350,7 +350,7 @@ export default function ValidatorRegistration() { ) : !isConnected ? (
-

Connect your wallet to register as a validator

+

Connect your wallet to register as a sequencer

) : ( @@ -499,7 +499,7 @@ export default function ValidatorRegistration() { {registrationCompleted && (
- Successfully registered validator and staked + Successfully registered sequencer and staked
)}
diff --git a/staking-dashboard/src/utils/stakingSteps.ts b/staking-dashboard/src/utils/stakingSteps.ts index 3df18b132..a776a9901 100644 --- a/staking-dashboard/src/utils/stakingSteps.ts +++ b/staking-dashboard/src/utils/stakingSteps.ts @@ -6,7 +6,7 @@ export const STAKING_STEPS = { title: "Select Token Position to stake", }, SET_VALIDATOR_ADDRESS: { - title: "Input your Validator Address and confirm it's up and synced", + title: "Input your Sequencer Address and confirm it's up and synced", }, SET_OPERATOR_ADDRESS: { title: "Set Operator Address", @@ -18,7 +18,7 @@ export const STAKING_STEPS = { title: "Approve token spending", }, UPLOAD_VALIDATOR_KEYS: { - title: "Upload Validator Keys", + title: "Upload Sequencer Keys", }, STAKE: { title: "Stake",