Skip to content

Commit

Permalink
May 25, 2023, 4:10 AM
Browse files Browse the repository at this point in the history
  • Loading branch information
xthet committed May 25, 2023
1 parent 7670b2f commit f0cd786
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/Campaign.sol
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ contract Campaign is KeeperCompatibleInterface, ReentrancyGuard{
}

function donate(address _donator, bool _rewardable) public payable nonReentrant{
// if(msg.sender != i_crf){revert();}
if(msg.sender != i_crf){revert();}
if(c_state != C_State.Fundraising){revert();}
if(_donator == i_creator){revert();}
currentBalance = currentBalance + msg.value;
Expand Down Expand Up @@ -164,7 +164,7 @@ contract Campaign is KeeperCompatibleInterface, ReentrancyGuard{
}

function refund(address _donator) external nonReentrant{
// if(msg.sender != i_crf){revert();}
if(msg.sender != i_crf){revert();}
if(c_state == C_State.Expired){revert();}
if(aggrDonations[_donator] == 0 ){revert();}
uint256 amountToRefund = aggrDonations[_donator];
Expand All @@ -176,7 +176,7 @@ contract Campaign is KeeperCompatibleInterface, ReentrancyGuard{
if(entDonations[_donator].length > 0){
for(uint i=0; i<entDonations[_donator].length; i++){
if(!(rewards[entDonations[_donator][i]] != address(0))){
Reward(rewards[entDonations[_donator][i]] ).removeDonator(_donator);
Reward(rewards[entDonations[_donator][i]]).removeDonator(_donator);
}
}
}
Expand Down

0 comments on commit f0cd786

Please sign in to comment.