Skip to content

feat(tips,indexer): tip status lifecycle, cursor pagination, DTO serializer, indexer cursor tests#1087

Merged
Akanimoh12 merged 10 commits into
Akanimoh12:test-implement-dripsfrom
bade2brazy:feat/880-881-886-892-batch
Jun 29, 2026
Merged

feat(tips,indexer): tip status lifecycle, cursor pagination, DTO serializer, indexer cursor tests#1087
Akanimoh12 merged 10 commits into
Akanimoh12:test-implement-dripsfrom
bade2brazy:feat/880-881-886-892-batch

Conversation

@bade2brazy

@bade2brazy bade2brazy commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Closes #880


Closes #881


Closes #886


Closes #892


Summary

  • Indexer: Indexer cursor persistence #892 — Indexer cursor persistence: adds cursor.test.ts (unit tests for getCursorLedger/setCursorLedger) and projections.test.ts (idempotency fixtures proving re-running over the same ledger range produces no duplicate rows)
  • Tips: Tip response DTO + serializer #886 — Tip response DTO + serializer: new tips.dto.ts (TipResponseDto interface) and tips.serializer.ts (serializeTip pure function converting BigInt→string, Date→ISO 8601, adds status field); refactors tips.service.ts to use the serializer throughout; new tips.serializer.test.ts with 7 unit tests
  • Tips: Tip status lifecycle (pending→confirmed) #880 — Tip status lifecycle: adds confirmTip(txHash) service function (PENDING→CONFIRMED, idempotent), confirmTipParamSchema, confirm controller, and PATCH /tips/:txHash/confirm route with OpenAPI spec entry
  • Tips: Tip pagination (cursor-based) #881 — Tip pagination (cursor-based): expands test coverage with cursor-chain tests (verifies nextCursor from page 1 is forwarded to Prisma as { cursor: { id }, skip: 1 } on page 2), non-cuid cursor rejection, and last-page null-cursor assertions

Test plan

  • cursor.test.ts — get null when no row, get stored ledger, upsert shape, idempotent writes, monotonic advance
  • projections.test.ts — new event persisted + Tip upserted, duplicate event log skipped on replay, Tip upsert still fires (no-op), non-tip topics skip Tip upsert, unparseable value handled gracefully, tip alias treated same as tip_sent
  • tips.serializer.test.ts — BigInt→string, Date→ISO, status/message fields
  • tips.test.ts — confirm 404 (not found), 200 PENDING→CONFIRMED (calls update), 200 idempotent on CONFIRMED (skips update), cursor chain page 1→2 passes correct Prisma args, non-cuid cursor returns 400, last-page nextCursor is null

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@bade2brazy 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

@bade2brazy bade2brazy closed this Jun 29, 2026
@bade2brazy bade2brazy force-pushed the feat/880-881-886-892-batch branch from f36d5e8 to ae452c7 Compare June 29, 2026 22:02
@bade2brazy bade2brazy reopened this Jun 29, 2026
@Akanimoh12 Akanimoh12 merged commit 0e86221 into Akanimoh12:test-implement-drips Jun 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants