Skip to content

Commit

Permalink
use solmate safeApprove
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongeric committed Nov 26, 2023
1 parent 7ce47b2 commit 1261cab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reactors/RelayOrderReactor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ contract RelayOrderReactor is ReactorEvents, ReactorErrors, ReentrancyGuard, IRe
(address token) = abi.decode(actionData, (address));
if (token == address(0)) revert InvalidToken();
if (ERC20(token).allowance(address(this), address(permit2)) == 0) {
ERC20(token).approve(address(permit2), type(uint256).max);
ERC20(token).safeApprove(address(permit2), type(uint256).max);
}
permit2.approve(token, universalRouter, type(uint160).max, type(uint48).max);
}
Expand Down

0 comments on commit 1261cab

Please sign in to comment.