Skip to content

Admin endpoint to resolve open trade disputes #329

Description

@ericmt-98

Problem

trade-safety.ts lets a user open a dispute via recordTradeDispute (abuse.service.ts), rate-limited by disputeRateLimitMax. There is no corresponding endpoint in admin.ts (or anywhere) for an admin to list open disputes and resolve them. Today, once a dispute is opened, there is no operational path to close it out — funds can sit stuck indefinitely.

Scope (backend only, no new UI in this issue)

  • GET /admin/disputes — list open disputes with trade context (amounts, parties, trade-scoped messages/evidence).
  • POST /admin/disputes/:id/resolve — admin action to refund buyer, release to seller, or ban a party; closes the dispute and updates trade status accordingly.
  • Audit log entry for every resolution (reuse audit.service.ts).

Out of scope

  • Admin dashboard UI (separate issue if wanted later).
  • Automated/algorithmic dispute resolution.

Why this matters

Funds can currently get stuck in an open dispute with no way to close it — direct user-funds risk.

Metadata

Metadata

Assignees

Labels

Stellar WaveEligible for Stellar Drips Wave rewardscomplexity: mediumRequiere cuenta, interceptor de tráfico, o conocimiento del protocoloenhancementNew feature or requestwave-7-dripsStellar Drips Wave 7wave:backendmicopay/backend surfacewave:trustAuth, persistence, audit, recovery

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions