Skip to content

feat: add pagination to admin disputes, emergency withdraw endpoint, share price endpoint, and webhook retry processor tests#1041

Merged
ogazboiz merged 1 commit into
LabsCrypt:mainfrom
aadviksinghdebug:main
May 29, 2026
Merged

feat: add pagination to admin disputes, emergency withdraw endpoint, share price endpoint, and webhook retry processor tests#1041
ogazboiz merged 1 commit into
LabsCrypt:mainfrom
aadviksinghdebug:main

Conversation

@aadviksinghdebug
Copy link
Copy Markdown

Implements 4 backend features/tests:

Closes #944 — Pagination for admin loan disputes

  • Cursor-based pagination on GET /admin/loan-disputes (and JWT GET /admin/disputes)
  • Default page size 50, max 100, newest-first ordering
  • Returns next_cursor and has_next in page_info envelope

Closes #945 — Emergency withdraw endpoint

  • buildEmergencyWithdrawTx in sorobanService (calls emergency_withdraw on LendingPool)
  • POST /pool/build-emergency-withdraw with Zod validation, JWT ownership check, idempotency
  • Reuses existing POST /pool/submit for signed XDR submission

Closes #946 — Share price endpoint

  • GET /pool/:token/share-price returning the on-chain share price (scaled by 1e6) plus human-readable ratio
  • 30-second Redis cache TTL to absorb burst requests

Closes #954 — Webhook retry processor tests

  • 8 unit tests covering retry lifecycle, backoff scheduling, circuit-breaker (max attempts open/half-open/close), and subscriber isolation

…share price endpoint, and webhook retry processor tests
@ogazboiz ogazboiz merged commit 284371d into LabsCrypt:main May 29, 2026
3 of 6 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

3 participants