Skip to content

Commit

Permalink
Security vulnerability issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ethexbet committed Jun 26, 2019
1 parent 10941e6 commit 6b8664b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions EthexJackpot.sol
Expand Up @@ -209,18 +209,17 @@ contract EthexJackpot {
if (seasonalPayAmount > 0)
getAddress(seasonalWin).transfer(seasonalPayAmount);
}

function paySuperPrize(address payable winner) external onlyLoto {
uint256 superPrizeAmount = dailyAmount + weeklyAmount + monthlyAmount + seasonalAmount;
dailyAmount = 0;
weeklyAmount = 0;
monthlyAmount = 0;
seasonalAmount = 0;
emit SuperPrize(superPrizeAmount, winner);
winner.transfer(superPrizeAmount);
}

function loadTickets(address payable[] calldata addresses, uint256[] calldata numbers) external {
for (uint i = 0; i < addresses.length; i++)
tickets[numbers[i]] = addresses[i];
}

function setOldVersion(address payable oldAddress) external onlyOwner {
previousContract = EthexJackpot(oldAddress);
dailyStart = previousContract.dailyStart();
Expand Down Expand Up @@ -252,7 +251,9 @@ contract EthexJackpot {
weeklyAmount = previousContract.weeklyAmount();
monthlyAmount = previousContract.monthlyAmount();
seasonalAmount = previousContract.seasonalAmount();
firstNumber = numberEnd;
firstNumber = weeklyNumberStart;
for (uint256 i = firstNumber; i <= numberEnd; i++)
tickets[i] = previousContract.getAddress(i);
previousContract.migrate();
}

Expand Down

0 comments on commit 6b8664b

Please sign in to comment.