Skip to content

feat: persist audit logs and expose escrow event projection (#198, #206)#252

Open
temitope-007 wants to merge 1 commit into
Liquifact:mainfrom
temitope-007:feature/issue-198-206
Open

feat: persist audit logs and expose escrow event projection (#198, #206)#252
temitope-007 wants to merge 1 commit into
Liquifact:mainfrom
temitope-007:feature/issue-198-206

Conversation

@temitope-007
Copy link
Copy Markdown
Contributor

This PR resolves two related backend infrastructure tasks to improve durability and caching:

Audit Log Persistence

  • Persists audit logs to the durable audit_log_events table instead of the in-memory array in src/services/auditLog.js.
  • Respects the append-only table configuration and check constraints.
  • Updates the invoice state machine and routes to handle asynchronous logging securely.

Escrow Event Projection

  • Exposes the escrow event projection through GET /api/escrow/:invoiceId.
  • Reads from escrow_event_projection keyed by invoice_id, including latest_ledger_sequence and latest_event_type.
  • Honors the existing Redis escrow cache and falls back to a live read only on cache and projection misses.
  • Maintains the X-Escrow-Address header.

Both feature sets achieve minimum 95% line coverage on changed code and pass all tests. No secrets have been exposed.

Closes #198
Closes #206

feat(api): serve escrow state from event projection
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@temitope-007 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