From 1261cab38c0473bc39ff2c4ecdae331d5b24d4ce Mon Sep 17 00:00:00 2001 From: Eric Zhong Date: Sun, 26 Nov 2023 10:11:57 -0500 Subject: [PATCH] use solmate safeApprove --- src/reactors/RelayOrderReactor.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reactors/RelayOrderReactor.sol b/src/reactors/RelayOrderReactor.sol index b986795d..bb20b339 100644 --- a/src/reactors/RelayOrderReactor.sol +++ b/src/reactors/RelayOrderReactor.sol @@ -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); }