Feature: Add Trading History section to reader dashboard
Problem
We now index all MCV2_Bond mint/burn trades in the trade_history table, but the reader dashboard only shows a portfolio summary and donation history. There's no way for readers to see their trading activity.
Scope
Add a "Trading History" section to the reader dashboard, positioned above the Donation History section.
Data source
Query trade_history table filtered by the connected wallet address (need to match against the tx_hash → on-chain user field, or add a user_address column to trade_history if not already present).
Check first: Does trade_history currently store the trader's wallet address? If not, this ticket includes adding a user_address column and updating the trade indexer routes to populate it.
Display
Each record should show:
- Event type: "Buy" (mint) or "Sell" (burn)
- Token name/storyline link
- Amount of tokens traded
- Reserve amount (PL_TEST) paid/received
- Timestamp
- Clickable Basescan tx link (
${EXPLORER_URL}/tx/${tx_hash})
Pagination
Files to Investigate
- Reader dashboard page/component
trade_history table schema (check for user_address column)
src/app/api/index/trade/route.ts and src/app/api/cron/trade-history/route.ts — may need to add user_address
Branch
task/352-trading-history
Dependencies
Labels
agent/T3, feat
Feature: Add Trading History section to reader dashboard
Problem
We now index all MCV2_Bond mint/burn trades in the
trade_historytable, but the reader dashboard only shows a portfolio summary and donation history. There's no way for readers to see their trading activity.Scope
Add a "Trading History" section to the reader dashboard, positioned above the Donation History section.
Data source
Query
trade_historytable filtered by the connected wallet address (need to match against thetx_hash→ on-chainuserfield, or add auser_addresscolumn totrade_historyif not already present).Check first: Does
trade_historycurrently store the trader's wallet address? If not, this ticket includes adding auser_addresscolumn and updating the trade indexer routes to populate it.Display
Each record should show:
${EXPLORER_URL}/tx/${tx_hash})Pagination
Files to Investigate
trade_historytable schema (check foruser_addresscolumn)src/app/api/index/trade/route.tsandsrc/app/api/cron/trade-history/route.ts— may need to adduser_addressBranch
task/352-trading-historyDependencies
Labels
agent/T3,feat