fix: Use forceApprove instead of regular Approve

This is necessary for USDT (it was failing)

--- don't change below this line ---
ENG-4307 Took 29 minutes
This commit is contained in:
Diana Carvalho
2025-04-10 15:44:02 +01:00
parent 9e68ab8b01
commit c963f3b2f6
2 changed files with 5 additions and 5 deletions

View File

@@ -62,7 +62,7 @@ contract CurveExecutor is IExecutor {
if (tokenApprovalNeeded && tokenIn != nativeToken) {
// slither-disable-next-line unused-return
IERC20(tokenIn).approve(address(pool), type(uint256).max);
IERC20(tokenIn).forceApprove(address(pool), type(uint256).max);
}
/// Inspired by Curve's router contract: https://github.com/curvefi/curve-router-ng/blob/9ab006ca848fc7f1995b6fbbecfecc1e0eb29e2a/contracts/Router.vy#L44