Skip to content

Commit

Permalink
[fix] 🐛 fix pay burn-prize enter condition (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
dappsar committed Dec 27, 2023
1 parent 315eaa7 commit 6cdac70
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions contracts/gamma/GammaCards.v5.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 6cdac70

Please sign in to comment.