Itheum / itheumcore-elrond-data-nft-marketplace

MuliversX blockchain Data NFT marketplace (Data Market)
0 stars 0 forks source link

C7: Allow only the owner to remove accepted tokens and payments #31

Closed damienen closed 1 year ago

damienen commented 1 year ago

This is a quite sensitive operation that would prevent some trades and should only be reserved to the owner.

Moreover, if all accepted tokens (or payments) are removed, the smart contract would not be considered as ready to trade aymore, and users won't be able to cancel or withdraw their offers, so their funds would be stuck.

In fact, to avoid users' funds being stuck more generally, remove require_sc_ready_to_trade from cancel_offer and withdraw_from_cancelled_offer, and instead we would just check that the smart contract is not paused in these two endpoints.

bucurdavid commented 1 year ago

but also for setting them @damienen ?

damienen commented 1 year ago

Best is to ask the auditor. I'm on it

On Sun, Apr 9, 2023, 12:53 PM Bucur David @.***> wrote:

but also for setting them @damienen https://github.com/damienen ?

— Reply to this email directly, view it on GitHub https://github.com/Itheum/itheumcore-elrond-data-nft-marketplace/issues/31#issuecomment-1501089928, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKV4Z5QVBILOZGNKMO7YBNLXAKBIFANCNFSM6AAAAAAWXQUL5M . You are receiving this because you were mentioned.Message ID: @.*** .com>

damienen commented 1 year ago

Checked. Solved.