Skip to content

Commit

Permalink
Merge 1a62444 into 4b9d122
Browse files Browse the repository at this point in the history
  • Loading branch information
asselstine committed Oct 14, 2021
2 parents 4b9d122 + 1a62444 commit e377a4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions contracts/PrizeDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ contract PrizeDistributor is IPrizeDistributor, Ownable {
unchecked {
payoutDiff = payout - oldPayout;
}

_setDrawPayoutBalanceOf(_user, drawId, payout);

totalPayout += payoutDiff;
Expand Down
5 changes: 4 additions & 1 deletion contracts/prize-pool/PrizePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ abstract contract PrizePool is IPrizePool, Ownable, ReentrancyGuard, IERC721Rece
uint256 currentAwardBalance = _currentAwardBalance;

require(_amount <= currentAwardBalance, "PrizePool/award-exceeds-avail");
_currentAwardBalance = currentAwardBalance - _amount;

unchecked {
_currentAwardBalance = currentAwardBalance - _amount;
}

ITicket _ticket = ticket;

Expand Down

0 comments on commit e377a4a

Please sign in to comment.