digital-asset / daml-finance

Apache License 2.0
17 stars 16 forks source link

`Batch` with HTLC / Relax the `Cancel` choice #1216

Closed johan-da closed 5 months ago

johan-da commented 5 months ago

This PR relaxes the Cancel choice for the HTLC Batch with the following changes:

  1. It allows the cancellation of a Batch that is either in the Open state or has expired.
  2. It enables the instructor (along with consenters) to cancel the Batch even if its Instructions are Approved and Allocated, removing the need to first unapprove or unallocate them, or to obtain additional authorization.

Previously, the Cancel choice of the Batch required the HTLC to be expired, preventing cancellation while in the Open (and non-expired) state.