Skip to content

Resolve issues #249, #281, #267, #279#306

Open
brightcli-stack wants to merge 1 commit into
Invoice-Liquidity-Network:mainfrom
brightcli-stack:fix/resolve-indexer-e2e-issues
Open

Resolve issues #249, #281, #267, #279#306
brightcli-stack wants to merge 1 commit into
Invoice-Liquidity-Network:mainfrom
brightcli-stack:fix/resolve-indexer-e2e-issues

Conversation

@brightcli-stack

@brightcli-stack brightcli-stack commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

This PR resolves issues #249, #281, #267, and #279.

Proposed Changes

1. Implement indexer REST API: GET /invoices (Closes #249)

  • Extended GET /invoices router in indexer/src/api/routes/invoices.ts to support pagination (page, pageSize), filters (state, token, submitter), and sorting (sortBy, sortOrder by createdAt, dueDate, amount, and discountRate).
  • Added the required Cache-Control: max-age=10 header.
  • Added comprehensive unit tests in indexer/tests/invoices.test.ts.

2. Per-Address Event Feed Endpoint: GET /events (Closes #267)

  • Created the new router indexer/src/api/routes/events.ts and registered it in indexer/src/app.ts.
  • Implemented GET /events?address=... filtering which joins events and invoices tables to return events where the address is the freelancer, payer, or funder. Supports pagination and type filtering (e.g. types=InvoiceFunded,InvoicePaid).
  • Added database indexes on the freelancer, payer, and funder columns of the invoices table to optimize queries.
  • Added corresponding unit tests in indexer/tests/events.test.ts.

3. E2E Test: Reputation System Lifecycle (Closes #281)

  • Created tests/e2e/reputation.test.ts to verify the E2E lifecycle of the reputation score system (submitting/paying 5 invoices results in score 100, letting 2 expire results in score ~33, verifying indexer GET /reputation/:address reflects the correct score and history).

4. E2E Test: Full Invoice Lifecycle (Closes #279)

  • Created tests/e2e/lifecycle.test.ts to execute a full submit -> fund -> pay lifecycle using the SDK against Stellar testnet and verify that the indexer reflects the state change within 10 seconds.

…rk#281, Invoice-Liquidity-Network#267, Invoice-Liquidity-Network#279: Implement GET /invoices list API, per-address event feed, and reputation/lifecycle E2E tests
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@brightcli-stack 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! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant