Description
EscrowService.create() (src/escrow/escrow.service.ts) generates escrow IDs as `esc-${Date.now()}` — a millisecond timestamp with no random component. Two escrows created within the same millisecond (entirely possible under concurrent requests, which Node.js's single-threaded event loop can still interleave between the Date.now() call and the Map.set()) get the exact same ID, and the second create() call silently overwrites the first escrow record in the in-memory Map. Compare this to GigService.create() (src/gig/gig.service.ts), which already appends a random suffix (`gig-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`), and DisputeSagaService.escalate() (src/dispute/dispute-saga.service.ts), which does the same for saga IDs — EscrowService is the one core identifier generator that doesn't follow this pattern.
Component
Backend
Difficulty
🟢 Easy
Tasks
Acceptance Criteria
Estimated Time
1-2 hours
Description
EscrowService.create()(src/escrow/escrow.service.ts) generates escrow IDs as`esc-${Date.now()}`— a millisecond timestamp with no random component. Two escrows created within the same millisecond (entirely possible under concurrent requests, which Node.js's single-threaded event loop can still interleave between theDate.now()call and theMap.set()) get the exact same ID, and the secondcreate()call silently overwrites the first escrow record in the in-memoryMap. Compare this toGigService.create()(src/gig/gig.service.ts), which already appends a random suffix (`gig-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`), andDisputeSagaService.escalate()(src/dispute/dispute-saga.service.ts), which does the same for saga IDs —EscrowServiceis the one core identifier generator that doesn't follow this pattern.Component
Backend
Difficulty
🟢 Easy
Tasks
EscrowService.create()'s ID generation to include a random/UUID component, consistent withGigService/DisputeSagaService's pattern (or adoptrandomUUID()as used inUserProfileService/MigrationRunnerService)Acceptance Criteria
create()callsEstimated Time
1-2 hours