Skip to content

Fix/issues 43 44 45 46#159

Merged
therealjhay merged 5 commits into
Betta-Pay:mainfrom
devpeter999:fix/issues-43-44-45-46
Jun 25, 2026
Merged

Fix/issues 43 44 45 46#159
therealjhay merged 5 commits into
Betta-Pay:mainfrom
devpeter999:fix/issues-43-44-45-46

Conversation

@devpeter999

Copy link
Copy Markdown
Contributor

fix: settlement limits, multi-asset batch, fx-engine health & shutdown

Closes #43, Closes #44, Closes #45, Closes #46

Summary

Files changed

  • services/fx-engine/src/index.ts — health endpoint + graceful shutdown
  • services/api-gateway/src/index.ts — settlement limit validation, multi-asset batch logic, missing idempotency constants added
  • shared/validation/schemas.tsCreateSettlementBody extended with items, UpdateMerchantSettingsBody extended with limit fields, settlementSchema includes batchId
  • prisma/schema.prismabatchId String? added to Settlement
  • prisma/migrations/20260625_add_settlement_batch_id/migration.sql — migration for batchId

Added GET /api/health returning service status and uptime in seconds.
POST /api/settlements now accepts an items array for multi-asset batch
settlements, with each item processed independently under a shared batch ID.
…ant limits

- CreateSettlementBody now accepts optional items array (amount/asset) for batch
- settlementSchema includes optional batchId field
- UpdateMerchantSettingsBody adds minSettlementAmount, maxSettlementAmount, dailySettlementLimit
Validates settlement amounts against min/max and daily aggregate limits
stored in merchant settings, returning 422 when limits are exceeded.
@drips-wave

drips-wave Bot commented Jun 25, 2026

Copy link
Copy Markdown

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

@therealjhay therealjhay merged commit 1e7b0e6 into Betta-Pay:main Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants