Skip to content

Commit

Permalink
use forceApprove instead of safeApprove
Browse files Browse the repository at this point in the history
  • Loading branch information
thal0x committed Nov 21, 2024
1 parent bc86f47 commit af52656
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AxelarHandler/src/GoFastHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ contract GoFastHandler is Initializable, UUPSUpgradeable, OwnableUpgradeable {
IERC20(token).safeTransferFrom(msg.sender, address(this), amountIn);
}

IERC20(token).safeApprove(address(fastTransferGateway), amountIn);
IERC20(token).forceApprove(address(fastTransferGateway), amountIn);

return fastTransferGateway.submitOrder(
sender, recipient, amountIn, amountOut, destinationDomain, timeoutTimestamp, data
Expand All @@ -125,7 +125,7 @@ contract GoFastHandler is Initializable, UUPSUpgradeable, OwnableUpgradeable {
if (tokenIn != address(0)) {
IERC20(tokenIn).safeTransferFrom(msg.sender, address(this), amountIn);

IERC20(tokenIn).safeApprove(address(swapRouter), amountIn);
IERC20(tokenIn).forceApprove(address(swapRouter), amountIn);
}

(bool success,) = address(swapRouter).call{value: msg.value}(swapCalldata);
Expand Down

0 comments on commit af52656

Please sign in to comment.