From 6cdac705bb26cd1475982ed5baf56058816afd0b Mon Sep 17 00:00:00 2001 From: dappsar Date: Wed, 27 Dec 2023 16:07:25 -0300 Subject: [PATCH] [fix] :bug: fix pay burn-prize enter condition (#2) --- contracts/gamma/GammaCards.v5.sol | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contracts/gamma/GammaCards.v5.sol b/contracts/gamma/GammaCards.v5.sol index 0acb5d1..a8fda2d 100644 --- a/contracts/gamma/GammaCards.v5.sol +++ b/contracts/gamma/GammaCards.v5.sol @@ -285,7 +285,6 @@ contract NofGammaCardsV5 is ERC721, ERC721URIStorage, ERC721Burnable, Ownable { function _openPack(address user, uint256 packNumber, uint8[] memory packData, bytes calldata signature) private { require(gammaPacksContract.getPackOwner(packNumber) == user, "This pack is not yours."); - // TO_REVIEW: chech this length require(packData.length < 15, "Card limit exceeded"); if (requireOpenPackSignerValidation) { @@ -412,7 +411,7 @@ contract NofGammaCardsV5 is ERC721, ERC721URIStorage, ERC721Burnable, Ownable { uint256 totalUserBurnedCards = burnedCards[msg.sender] + cardNumbers.length; bool mustPayPrize = false; - if (totalUserBurnedCards % 60 == 0) { + if (totalUserBurnedCards >= 60) { require(prizesBalance >= secondaryAlbumPrize, "Insufficient funds (burnCards balance)."); uint256 contractBalance = IERC20(DAI_TOKEN).balanceOf(address(this));