Closed bb111189 closed 2 years ago
Seller cannot cancel such auction too
procedure CancelAuction(
token_address: ByStr20 with contract
field royalty_recipient: ByStr20,
field royalty_fee_bps: Uint128,
field spenders: Map Uint256 ByStr20,
field token_owners: Map Uint256 ByStr20
end,
token_id: Uint256
)
(* Check the sell order does exist *)
maybe_sell_order <- sell_orders[token_address][token_id];
match maybe_sell_order with
| None =>
(* Sell order doesn't exist *)
error = SellOrderNotFoundError;
Throw error
| Some (SellOrder seller expiration_bnum payment_token_address start_amount) =>
(* Check the sell order is not expired *)
(* An auction cannot be cancelled once it has been expired. *)
RequireNotExpired expiration_bnum;
(* Only seller must be able to cancel the sell order *)
RequireAccessToCancel seller;
So the auction might be "stuck"
Yes, the seller should be able to end it to get the asset back. Nice catch!
If an auction end with no buy order, it should just finalize it without any buyer. Currently, if there is no buyer, the exception is thrown and an auction cannot be ended.