From b9c323509e0ebe48f17a5f23fea4f75758e562c5 Mon Sep 17 00:00:00 2001 From: Eduardo Melo Date: Fri, 20 Sep 2024 11:55:20 -0300 Subject: [PATCH] fix: comments from PR --- contracts/ERC20Splitter.sol | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/contracts/ERC20Splitter.sol b/contracts/ERC20Splitter.sol index 02a25af..8a0f486 100644 --- a/contracts/ERC20Splitter.sol +++ b/contracts/ERC20Splitter.sol @@ -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]; @@ -82,8 +82,6 @@ contract ERC20Splitter is ReentrancyGuard { 'ERC20Splitter: Transfer failed' ); } - - withdrawnAmounts[i] = amount; } emit Withdraw(msg.sender, tokenAddresses, withdrawnAmounts);