From af52656432f1bddd5fcd5ba8cbeee16d2b63d78e Mon Sep 17 00:00:00 2001 From: thal0x Date: Thu, 21 Nov 2024 05:32:47 -0600 Subject: [PATCH] use forceApprove instead of safeApprove --- AxelarHandler/src/GoFastHandler.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AxelarHandler/src/GoFastHandler.sol b/AxelarHandler/src/GoFastHandler.sol index fc8dd3b..97c38fc 100644 --- a/AxelarHandler/src/GoFastHandler.sol +++ b/AxelarHandler/src/GoFastHandler.sol @@ -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 @@ -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);