-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Complexity: Medium (150 points)
Description
Add dedicated endpoint to retrieve escrow activity history with filtering and pagination.
Requirements and Context
EscrowEvent entity logs all escrow actions but lacks dedicated retrieval endpoint
Events are returned nested in escrow response but no standalone query
Users need to audit escrow timeline for transparency and dispute evidence
Required for dashboard activity feeds
Suggested Execution
Fork repo, create branch feat/transaction-history
Create ListEventsDto with filters: eventType, dateRange, actorId
Add findEvents method to EscrowService
Create endpoints:
GET /escrows/:id/events - events for specific escrow
GET /events - all events for user's escrows (with pagination)
Support sorting by timestamp (default: descending)
Include actor details (wallet address) in response
Test and Commit
Test pagination and filtering
Test user can only see events from their escrows
Verify event ordering
Test empty result sets
Example Commit Message
feat: add escrow activity history endpoints with filtering
Expose escrow events via dedicated endpoints supporting pagination,
filtering by event type, and date range queries.
Guidelines
Ensure party-level access control (users see only their escrows' events)
Consider rate limiting for event queries
Format timestamps consistently (ISO 8601)
Support cursor-based pagination for performance (future enhancement)