Skip to content

Commit

Permalink
Do not allow fill zero items
Browse files Browse the repository at this point in the history
  • Loading branch information
lykhonis committed Feb 13, 2024
1 parent 0c5fd64 commit 5ed3b5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/marketplace/lsp7/LSP7Orders.sol
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ contract LSP7Orders is ILSP7Orders, Module {
nonReentrant
onlyMarketplace
{
if (itemCount == 0) {
revert InvalidItemCount(itemCount);
}
LSP7Order memory order = getOrder(id);
if (itemCount > order.itemCount) {
revert InsufficientItemCount(order.itemCount, itemCount);
Expand Down

0 comments on commit 5ed3b5d

Please sign in to comment.