Cancel Buy Offer

Function:

public fun cancel_buy_offer<CURRENCY>(
    ledger: &mut TradeLedger,
    offer_id: ID,
    collection_cap: &CollectionCap,
    clock: &Clock,
    ctx: &mut TxContext
)

Description:

  • Allows a buyer to cancel their buy offer.

  • The locked payment is returned to the buyer.

  • The buy offer is updated to CANCELLED.

Validations:

  • Only the buyer can cancel the offer.

  • The offer must be open.

Last updated