Currently anyone can call the cancelSale function on any order that exists and is not already cancelled.
I suggest changing this so that an order can't be cancelled if it is already sold. And make it so it can't be cancelled if it is not active.
And I suggest changing this so that only the seller can cancel the order unless perhaps the seller no longer owns the item, then perhaps anyone can cancel the order.
Currently anyone can call the
cancelSale
function on any order that exists and is not already cancelled.I suggest changing this so that an order can't be cancelled if it is already sold. And make it so it can't be cancelled if it is not active.
And I suggest changing this so that only the seller can cancel the order unless perhaps the seller no longer owns the item, then perhaps anyone can cancel the order.