fix: remove extra _receiver and redundant asserts
This commit is contained in:
@@ -75,9 +75,7 @@ contract UniswapV4Executor is IExecutor, V4Router {
|
||||
uint8 action = uint8(bytes1(actions[0]));
|
||||
|
||||
// Get receiver from params[2] for all cases
|
||||
(, address _receiver,) =
|
||||
abi.decode(params[2], (Currency, address, uint256));
|
||||
receiver = _receiver;
|
||||
(, receiver,) = abi.decode(params[2], (Currency, address, uint256));
|
||||
|
||||
if (action == uint8(Actions.SWAP_EXACT_IN_SINGLE)) {
|
||||
IV4Router.ExactInputSingleParams memory swapParams =
|
||||
|
||||
@@ -69,9 +69,6 @@ contract UniswapV4ExecutorTest is Test, Constants {
|
||||
uint256 usdeBalanceBeforePool = USDE.balanceOf(poolManager);
|
||||
uint256 usdeBalanceBeforeSwapExecutor =
|
||||
USDE.balanceOf(address(uniswapV4Exposed));
|
||||
assertEq(usdeBalanceBeforeSwapExecutor, amountIn);
|
||||
uint256 usdtBalanceBeforeSwapBob = USDT.balanceOf(address(BOB));
|
||||
assertEq(usdtBalanceBeforeSwapBob, 0);
|
||||
|
||||
bytes memory data = _encodeExactInputSingle(
|
||||
USDE_ADDR, USDT_ADDR, 100, BOB, true, 1, uint128(amountIn)
|
||||
@@ -83,7 +80,7 @@ contract UniswapV4ExecutorTest is Test, Constants {
|
||||
USDE.balanceOf(address(uniswapV4Exposed)),
|
||||
usdeBalanceBeforeSwapExecutor - amountIn
|
||||
);
|
||||
assertTrue(USDT.balanceOf(BOB) == amountOut && amountOut > 0);
|
||||
assertTrue(USDT.balanceOf(BOB) == amountOut);
|
||||
}
|
||||
|
||||
function _encodeExactInputSingle(
|
||||
|
||||
Reference in New Issue
Block a user