Skip to content

Commit

Permalink
fix: comments from PR
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardoMelo00 committed Sep 20, 2024
1 parent 254c27a commit b9c3235
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions contracts/ERC20Splitter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ contract ERC20Splitter is ReentrancyGuard {
for (uint256 i = 0; i < tokenCount; i++) {
address tokenAddress = tokenAddresses[i];
uint256 amount = balances[tokenAddress][msg.sender];

withdrawnAmounts[i] = amount;
if (amount == 0) {
return;
continue;
}

delete balances[tokenAddress][msg.sender];
Expand All @@ -82,8 +82,6 @@ contract ERC20Splitter is ReentrancyGuard {
'ERC20Splitter: Transfer failed'
);
}

withdrawnAmounts[i] = amount;
}

emit Withdraw(msg.sender, tokenAddresses, withdrawnAmounts);
Expand Down

0 comments on commit b9c3235

Please sign in to comment.