Skip to content

Commit

Permalink
Update approve
Browse files Browse the repository at this point in the history
  • Loading branch information
viatrix committed Dec 3, 2024
1 parent 6c20071 commit e4d6cf3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contracts/adapters/SwapAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ contract SwapAdapter is AccessControl {
true // A flag for whether the input tokens should come from the msg.sender
);
_swapRouter.execute(commands, inputs, block.timestamp);
IERC20(tokenIn).approve(address(_permit2), 0);
uint256 balanceAfter = IERC20(tokenIn).balanceOf(address(this));
amountIn = balanceBefore - balanceAfter;
emit TokensSwapped(tokenIn, tokenOut, amountIn, amountOut);
Expand Down

0 comments on commit e4d6cf3

Please sign in to comment.