We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba05340 commit b7b5768Copy full SHA for b7b5768
src/swapModules/SwapAlgebra.sol
@@ -263,14 +263,11 @@ contract SwapAlgebra is ISwap, Ownable {
263
// Verify we received at least the minimum amount expected
264
require(actualAmountOut >= minRequiredAmount, "Slippage tolerance exceeded");
265
266
- // Use the actual received amount for the transfer to the user
267
- uint256 amountToTransfer = actualAmountOut;
268
-
269
// Transfer output tokens to sender
270
- IERC20(tokenOut).safeTransfer(msg.sender, amountToTransfer);
+ IERC20(tokenOut).safeTransfer(msg.sender, actualAmountOut);
271
272
// Update the return value to match what was actually received and transferred
273
- amountOut = amountToTransfer;
+ amountOut = actualAmountOut;
274
}
275
276
return amountOut;
0 commit comments