Skip to content

Commit

Permalink
Merge branch 'main' into perf/compiler-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth authored Oct 29, 2024
2 parents defa892 + 53dd414 commit d6b0a96
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contracts/InterchainTokenService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -701,14 +701,15 @@ contract InterchainTokenService is
destinationAddress = destinationAddressBytes.toAddress();
}

address recipient = (expressExecutor == address(0)) ? destinationAddress : expressExecutor;
address tokenAddress;
(amount, tokenAddress) = _giveToken(tokenId, recipient, amount);
// Return token to the express executor
if (expressExecutor != address(0)) {
_giveToken(tokenId, expressExecutor, amount);
return;
}

address tokenAddress;
(amount, tokenAddress) = _giveToken(tokenId, destinationAddress, amount);

// slither-disable-next-line reentrancy-events
emit InterchainTransferReceived(
commandId,
Expand Down

0 comments on commit d6b0a96

Please sign in to comment.