Changes Required
1. Holdings card: 2 boxes instead of 4
Replace the current 4-box grid (Value, Balance, PnL, First Traded) with 2 boxes:
- Value — Current value in USD with % change from cost basis (not 24h change)
- Value:
currentPrice * balanceNum * plotUsd
- Cost:
entryPrice * balanceNum * plotUsd
- Percent:
((currentValue - cost) / cost) * 100
- Example: if cost was $1 and current value is $1.30, show "$1.30 +30%"
- Balance — Keep as-is (token balance formatted as compact number)
Remove PnL and First Traded boxes entirely.
2. Holdings card: add recent 5 transactions list
Below the 2 boxes, add a simple list view showing the most recent 5 transactions for this story token (buys & sells).
- Query
trade_history for this token address + user address, ordered by block_timestamp desc, limit 5
- Simple list items (no outlined box), similar to activity items
- Show: buy/sell indicator, amount, date
3. Portfolio dashboard: 2 boxes instead of 4
Replace the current 4-box grid (PLOT, USD, Holdings, Best 24h) with 2 boxes:
- Value — Total portfolio value in USD with % change from total cost basis
- Sum of all holdings' current values vs sum of all holdings' cost bases
- Percent:
((totalCurrentValue - totalCost) / totalCost) * 100
- Holdings — Keep as-is (count of holdings)
Remove PLOT and Best 24h boxes entirely.
File
src/app/profile/[address]/page.tsx — Portfolio section (~line 1456) and holdings cards (~line 1525)
Branch
task/772-reader-cost-pnl
Changes Required
1. Holdings card: 2 boxes instead of 4
Replace the current 4-box grid (Value, Balance, PnL, First Traded) with 2 boxes:
currentPrice * balanceNum * plotUsdentryPrice * balanceNum * plotUsd((currentValue - cost) / cost) * 100Remove PnL and First Traded boxes entirely.
2. Holdings card: add recent 5 transactions list
Below the 2 boxes, add a simple list view showing the most recent 5 transactions for this story token (buys & sells).
trade_historyfor this token address + user address, ordered byblock_timestampdesc, limit 53. Portfolio dashboard: 2 boxes instead of 4
Replace the current 4-box grid (PLOT, USD, Holdings, Best 24h) with 2 boxes:
((totalCurrentValue - totalCost) / totalCost) * 100Remove PLOT and Best 24h boxes entirely.
File
src/app/profile/[address]/page.tsx— Portfolio section (~line 1456) and holdings cards (~line 1525)Branch
task/772-reader-cost-pnl