Skip to content

fix: incorrect action buttons during cooperative cancellation #575

@Catrya

Description

@Catrya

The FSM action matrix in order_state.dart shows incorrect buttons during cooperative cancellation because it doesn't distinguish whether the cancellation was initiated from active or fiat-sent status.
When a cooperative cancel is pending and the order was in active status:

  • The buyer loses the fiat-sent button and cannot mark fiat as sent to complete the trade before the cancellation is finalized
  • The seller sees a release button that does nothing when pressed, because there is no hold invoice to release, the buyer never sent fiat

Root cause

The FSM has no memory of the previous status. When transitioning to cooperativelyCanceled, it shows the same buttons regardless of whether the order came from active or fiat-sent.

Location: lib/features/order/models/order_state.dart — Seller role lines 444-456, Buyer role lines 569-578 (Status.cooperativelyCanceled)

Expected behavior

Role Previous status Cooperative cancel buttons
Buyer active fiatSent, cancel, dispute, sendDm
Buyer fiat-sent cancel, dispute, sendDm
Seller active cancel, dispute, sendDm (no release)
Seller fiat-sent release, cancel, dispute, sendDm

Metadata

Metadata

Assignees

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