Skip to content

Commit b7b5768

Browse files
committed
comment
1 parent ba05340 commit b7b5768

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/swapModules/SwapAlgebra.sol

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,11 @@ contract SwapAlgebra is ISwap, Ownable {
263263
// Verify we received at least the minimum amount expected
264264
require(actualAmountOut >= minRequiredAmount, "Slippage tolerance exceeded");
265265

266-
// Use the actual received amount for the transfer to the user
267-
uint256 amountToTransfer = actualAmountOut;
268-
269266
// Transfer output tokens to sender
270-
IERC20(tokenOut).safeTransfer(msg.sender, amountToTransfer);
267+
IERC20(tokenOut).safeTransfer(msg.sender, actualAmountOut);
271268

272269
// Update the return value to match what was actually received and transferred
273-
amountOut = amountToTransfer;
270+
amountOut = actualAmountOut;
274271
}
275272

276273
return amountOut;

0 commit comments

Comments
 (0)