feat: add user profile page with held keys, staking positions, and tr… - #1010
Merged
Chucks1093 merged 1 commit intoSep 27, 2026
Merged
Conversation
…ade history (accesslayerorg#921) Build the user profile page showing all creator keys held, active staking positions, and a paginated trading history for the connected wallet. - ProfilePage now serves both the owner dashboard (/profile) and a shareable public portfolio (/profile/:wallet). Wallet-specific actions (buy/sell, claim, share) render only when the viewer owns the profile. - PortfolioSummaryHeader sums held keys and staked positions at current bond-curve prices, with per-segment breakdown and unrealised PnL. - HeldKeysGrid values every held key from its bonding-curve price and shows per-position unrealised PnL, sorted by total value. - StakingPositionsList renders staked quantity, current value, a live lock countdown, and claimable rewards with a Claim action for the owner. - TradeHistoryTable gains cursor-based infinite scroll via an IntersectionObserver sentinel, keeping the Load More button as a manual fallback. - New wallet.service / stakingPositions.service back the holdings and staking-positions queries; useWalletHoldings now fetches real holdings instead of resolving empty. - Profile claim invalidates the staking-positions cache on success. Tests stub @/services/wallet.service in the LandingPage buy/sell flow integrations: those suites drive the real useWalletHoldings query, which now performs a network request with no backend behind it in tests.
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #921 User Profile Page with Held Keys, Staking Positions & Trade History
Summary
Turns the profile page into a full portfolio dashboard. The page serves two audiences from one component: the owner at
/profile, and anyone via the shareable/profile/:walletlink.Tabs:
Changes
New Components & Services
src/services/wallet.service.ts—GET /wallets/:address/holdingssrc/services/stakingPositions.service.ts— positions + claim flowsrc/hooks/useCreatorPrices.ts— current bonding-curve creator pricessrc/hooks/useStakingPositions.ts— staking-positions querysrc/utils/stakingPositions.utils.ts— lock status, countdowns, staked valuesrc/components/common/HeldKeysGrid.tsxsrc/components/common/StakingPositionsList.tsxsrc/components/common/PortfolioSummaryHeader.tsxModified & Integration
src/pages/ProfilePage.tsx— owner + public portfolio view, gated wallet actions (isOwnWallet)src/components/common/TradeHistoryTable.tsx— cursor-based infinite scroll viaIntersectionObserversentinel with manual fallbacksrc/hooks/useWallet.ts—useWalletHoldingsfetches holdings from wallet service; claim invalidates staking-positions cachesrc/utils/portfolioValue.utils.ts— held-key valuation and unrealised PnL calculationsrc/lib/queryKeys.ts— wallet holdings, staking positions, creator pricessrc/routes.tsx— shareable/profile/:walletpublic routeVerification & Testing
pnpm exec tsc -b --noEmit: 0 errorsProfilePage.integration.test.tsx(owner + public views, tab gating)HeldKeysGrid/PortfolioSummaryHeader/StakingPositionsListTradeHistoryTable.infiniteScroll.test.tsxuseWalletHoldings,wallet.service,stakingPositions.servicestakingPositions.utils,portfolioValue.pnlCloses #921