Skip to content

Commit

Permalink
minor changes, stack too deep error :(
Browse files Browse the repository at this point in the history
  • Loading branch information
naman1402 committed Nov 28, 2024
1 parent 5fdeb2c commit ab202e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JITHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ contract JITHook is BaseHook {
(token0Balance, token1Balance) = _getBalanceFromStrategy(currentActiveStrategyId, key.currency0, key.currency1);

// check if we have enough funds to cover the swap before adding liquidity
int256 absAmountSpecified = params.amountSpecified < 0 ? -params.amountSpecified : params.amountSpecified;
int256 absAmountSpecified = amountSpecified < 0 ? -amountSpecified : amountSpecified;
require(token0Balance >= uint256(absAmountSpecified) || token1Balance >= (uint256(absAmountSpecified) * currentPoolPrice) / 1e18, "No balance");

// withdraw funds from external swap before adding to the pool
Expand Down

0 comments on commit ab202e5

Please sign in to comment.