Skip to content

feat: add LP earnings history export#95

Open
newmattock wants to merge 2 commits into
Invoice-Liquidity-Network:mainfrom
newmattock:feat/lp-earnings-history
Open

feat: add LP earnings history export#95
newmattock wants to merge 2 commits into
Invoice-Liquidity-Network:mainfrom
newmattock:feat/lp-earnings-history

Conversation

@newmattock
Copy link
Copy Markdown

Fixes #30

Summary

  • add an Earnings History section to the LP portfolio view
  • show paid LP positions with invoice ID, payer, settlement date, amount funded, payout received, earned amount, token, and yield percent
  • sort earnings rows newest first and paginate 20 rows per page
  • export all earnings rows, not just the visible page, as ILN-LP-Earnings-[date].csv
  • add LP earnings row/CSV/filename tests

Notes

  • This frontend does not currently expose a separate InvoicePaid event-history API. The table is derived from the LP portfolio invoice list and includes invoices with Paid status, using funded_at when present and due_date as the fallback settlement timestamp.
  • Also includes a small build fix for the newly-required governance Vetoed status config on current main, plus the Vitest @ alias fix used by focused tests.

Validation

  • npm test -- src/utils/tests/lpEarnings.test.ts --reporter verbose
  • npx eslint src/utils/lpEarnings.ts src/utils/tests/lpEarnings.test.ts src/components/LPEarningsTable.tsx src/components/LPPortfolio.tsx vitest.config.ts
  • npm run build
  • git diff --check
  • local smoke: HEAD /lp returned HTTP 200 on port 3017

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.

Add LP earnings history table with export

1 participant