nascarsid / Boolien-Smart-Contracts

0 stars 1 forks source link

Add Authentication to `cancelSale` function #7

Closed mudgen closed 2 years ago

mudgen commented 2 years ago

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.