Skip to content

Commit

Permalink
chore: eliminate redundant assignment (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahramy authored Nov 1, 2024
1 parent 2035023 commit 588f79c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions contracts/TokenHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,8 @@ contract TokenHandler is ITokenHandler, ITokenManagerType, ReentrancyGuard, Crea
_transferTokenFrom(tokenAddress, from, to, amount);

uint256 diff = IERC20(tokenAddress).balanceOf(to) - balanceBefore;
if (diff < amount) {
amount = diff;
}

return amount;
return diff < amount ? diff : amount;
}

function _giveInterchainToken(address tokenAddress, address to, uint256 amount) internal {
Expand Down

0 comments on commit 588f79c

Please sign in to comment.