Skip to content

Commit fe42bcf

Browse files
committed
reuse declared variable
1 parent f10e7ce commit fe42bcf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/EulerSwapHook.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ contract EulerSwapHook is EulerSwap, BaseHook {
5959

6060
{
6161
(Currency inputCurrency, Currency outputCurrency) =
62-
params.zeroForOne ? (key.currency0, key.currency1) : (key.currency1, key.currency0);
62+
zeroForOne ? (key.currency0, key.currency1) : (key.currency1, key.currency0);
6363

6464
uint256 amountIn;
6565
bool isExactInput = params.amountSpecified < 0;
6666
if (isExactInput) {
6767
amountIn = uint256(-params.amountSpecified);
68-
amountOut = computeQuote(params.zeroForOne, uint256(-params.amountSpecified), true);
68+
amountOut = computeQuote(zeroForOne, uint256(-params.amountSpecified), true);
6969
} else {
70-
amountIn = computeQuote(params.zeroForOne, uint256(params.amountSpecified), false);
70+
amountIn = computeQuote(zeroForOne, uint256(params.amountSpecified), false);
7171
amountOut = uint256(params.amountSpecified);
7272
}
7373

0 commit comments

Comments
 (0)