Skip to content

Feat/917 staking dashboard - #1009

Open
CHKM001 wants to merge 2 commits into
accesslayerorg:devfrom
CHKM001:feat/917-staking-dashboard
Open

CHKM001 wants to merge 2 commits into
accesslayerorg:devfrom
CHKM001:feat/917-staking-dashboard

Conversation

@CHKM001

@CHKM001 CHKM001 commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

PR #917 feat(staking): build staking dashboard with lock period selection and reward tracking

Summary

Creates the dedicated Staking Dashboard (/staking) where users can stake creator keys, select lock periods, preview estimated APY rewards, track accrued rewards, claim payouts, and unstake keys upon lock expiry.

Key Changes

  • Staking Dashboard Page (src/pages/StakingDashboardPage.tsx):
    • Top Summary Cards: Renders total portfolio staked value (in XLM / Stroops), total claimable rewards, and active positions count.
    • Stake Creator Keys Form: Enables selecting held creator keys, specifying quantity (with Max button), and choosing lock period options (30d @ 5.0% APY, 90d @ 12.0% APY, 180d @ 20.0% APY, 365d @ 35.0% APY) with real-time estimated XLM rewards calculation.
    • Active Positions Table: Lists active stake positions with lock expiry dates, live countdown timers, claimable reward balances, per-position reward Claim buttons, and time-restricted Unstake buttons (disabled while locked, enabled once expired).
  • Staking Dashboard Hook (src/hooks/useStakingDashboard.ts):
    • Custom React Query mutations for staking, unstaking, and claiming rewards.
    • Automatic cache invalidation for staking.positions, staking.summary, and wallet.holdings query families.
    • Success toast notifications using showToast.
  • Router & Query Keys:
    • Registered route /staking in src/routes.tsx.
    • Added staking query key namespace in src/lib/queryKeys.ts.
  • Unit & Integration Tests:
    • src/hooks/__tests__/useStakingDashboard.test.tsx: Tests mutation behavior, toast notifications, and query invalidation.
    • src/pages/__tests__/StakingDashboardPage.integration.test.tsx: Tests wallet connect state, lock period UI, APY estimates, and claim/unstake button states.

Verification & Testing

  • pnpm exec tsc -b --noEmit: Completed with 0 errors.
  • pnpm test: All 10 unit and integration tests passed cleanly.
  • Clean merge check against origin/dev verified.

Closes #917

@drips-wave

drips-wave Bot commented Sep 26, 2026

Copy link
Copy Markdown

@CHKM001 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@CHKM001
CHKM001 force-pushed the feat/917-staking-dashboard branch from b89239d to ff0e384 Compare September 26, 2026 21:35
@CHKM001
CHKM001 force-pushed the feat/917-staking-dashboard branch from ff0e384 to 9a27dc2 Compare September 26, 2026 21:42
@Chucks1093

Copy link
Copy Markdown
Member

conflict

@Chucks1093

Copy link
Copy Markdown
Member

Conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build staking dashboard with lock period selection and reward tracking

2 participants