Skip to content

Stake page: plain validators + labeled ancestor fallback #519

Open

Description

@elliotBraem

Part of #$E.

What to build: Staking shows what's actually there instead of resolving a target magically. The stake page lists the node's own validators (default first); when it has none, it lists the nearest ancestor's validators labeled "via {ancestor name}" ("Stake via Malaysia") — plain composition in the route from the validators-by-node read plus the parent chain the place page already loads. No resolver module, no sourceNodeId bookkeeping. The resolution machinery is deleted outright: resolveForStaking, stakeableNodeIds, and their recursive CTEs. stakeable on community listings simplifies to "this node has validators". The wallet staking transaction flow is unchanged. Behavior change (intended): descendant search dies — stake at a country no longer surfaces a city's validator from its subtree.

Blocked by: #$N3.

Acceptance criteria

  • Node with validators: stake page shows them, default pre-selected (as today)
  • Node without validators: nearest ancestor's validators shown, labeled "via {ancestor name}" (e.g. KL page shows Malaysia's pool)
  • No validators anywhere in the chain: existing browse-children state
  • Community listings: stakeable = has validators; resolver routes and recursive SQL are gone
  • Staking transaction flow unchanged (same account IDs, same whitelist checks)
  • pnpm run typecheck, pnpm run test, pnpm run lint pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready-for-agentReady for an AI agent to implement

Type

No type

Fields

Priority

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions