Skip to content

Implement invoice deadline soft-lock during active dispute #225

Description

@Kingsman-99

Label: complexity: high
Points: 200

Description

If dispute arbitration is implemented (separate issue), an invoice's deadline could pass while a dispute is being arbitrated, triggering an unwanted automatic refund mid-arbitration. This issue freezes the deadline clock during an active dispute.

Technical Context

Involves lib.rs refund() — when checking env.ledger().timestamp() > invoice.deadline, also check a disputed flag (from the dispute arbitration feature) and block refund eligibility entirely while disputed, regardless of how far past the deadline the ledger time has advanced.

Acceptance Criteria

  • refund() panics with "invoice under dispute" instead of processing while disputed == true, even past the deadline
  • Once the dispute resolves (cleared), normal deadline-based refund eligibility resumes immediately
  • Non-disputed invoices are completely unaffected by this change
  • Test: disputed invoice past deadline blocks refund; resolving the dispute then allows refund to proceed
  • All existing cargo tests pass
  • cargo clippy passes with zero warnings

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 pts

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions