Skip to content

Commit

Permalink
Change < to != to avoid dust tokens retention
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgrathcoutinho committed Sep 17, 2023
1 parent 81a1e8e commit 6d42ffa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/TicketManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ contract TicketManager is ERC1155, ReentrancyGuard, EventManager {
uint256 remainingTickets = events[eventId].remainingTickets;

if(numOfTickets > remainingTickets) revert ExceededTicketQtyLeft();
if(msg.value < events[eventId].price * numOfTickets) revert InsufficientETHSent();
if(msg.value != events[eventId].price * numOfTickets) revert InsufficientETHSent();

events[eventId].remainingTickets = remainingTickets - numOfTickets;

Expand Down

0 comments on commit 6d42ffa

Please sign in to comment.