Skip to content

[Feat] Trading History section on reader dashboard with pagination #352

@realproject7

Description

@realproject7

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions