Skip to content

Guard escrow webhook state transitions#496

Merged
ralyodio merged 2 commits into
profullstack:masterfrom
phucnguyen1707:fix/escrow-webhook-state
Jul 9, 2026
Merged

Guard escrow webhook state transitions#496
ralyodio merged 2 commits into
profullstack:masterfrom
phucnguyen1707:fix/escrow-webhook-state

Conversation

@phucnguyen1707

Copy link
Copy Markdown
Contributor

Summary

  • Guard escrow webhook status updates with allowed current states so stale events cannot overwrite closed escrow states
  • Keep funded, released, and refunded transitions idempotent before application updates or notifications run
  • Add webhook tests for the pending funded flow and stale funded/refunded events on released escrows

Tests

  • pnpm test:run src/app/api/payments/coinpayportal/webhook/route.test.ts
  • pnpm exec eslint src/app/api/payments/coinpayportal/webhook/route.ts src/app/api/payments/coinpayportal/webhook/route.test.ts
  • pnpm type-check
  • pre-commit hook: lint, type-check, full test suite, production build

@phucnguyen1707 phucnguyen1707 force-pushed the fix/escrow-webhook-state branch from e251ce9 to 33ecabd Compare July 9, 2026 12:48
@ralyodio ralyodio merged commit 340795a into profullstack:master Jul 9, 2026
5 checks 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

Development

Successfully merging this pull request may close these issues.

2 participants