Skip to content

Commit

Permalink
Merge pull request #110 from P4-Games/fix/gamma-conditions
Browse files Browse the repository at this point in the history
[fix] 🐛 fix pay burn-prize enter condition (#2)
  • Loading branch information
dappsar authored Dec 27, 2023
2 parents 315eaa7 + 6cdac70 commit 160f06b
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 160f06b

Please sign in to comment.