Skip to content

Commit

Permalink
small refactor mdoify liq
Browse files Browse the repository at this point in the history
  • Loading branch information
hensha256 committed Mar 19, 2024
1 parent ab516e2 commit 5ded835
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .forge-snapshots/addLiquidity with empty hook.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
317433
317425
2 changes: 1 addition & 1 deletion .forge-snapshots/addLiquidity with native token.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
197891
197883
2 changes: 1 addition & 1 deletion .forge-snapshots/addLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
197873
197865
2 changes: 1 addition & 1 deletion .forge-snapshots/poolManager bytecode size.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
23531
23522
2 changes: 1 addition & 1 deletion .forge-snapshots/removeLiquidity with empty hook.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
104478
104470
2 changes: 1 addition & 1 deletion .forge-snapshots/removeLiquidity with native token.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
205851
205843
2 changes: 1 addition & 1 deletion .forge-snapshots/removeLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
202128
202120
3 changes: 1 addition & 2 deletions src/PoolManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,9 @@ contract PoolManager is IPoolManager, ProtocolFees, NoDelegateCall, ERC6909Claim
emit ModifyLiquidity(id, msg.sender, params.tickLower, params.tickUpper, params.liquidityDelta);

BalanceDelta hookDelta = key.hooks.afterModifyLiquidity(key, params, delta, hookData);
delta = delta - hookDelta;

_accountPoolBalanceDelta(key, hookDelta, address(key.hooks));
_accountPoolBalanceDelta(key, delta, msg.sender);
_accountPoolBalanceDelta(key, delta - hookDelta, msg.sender);
}

/// @inheritdoc IPoolManager
Expand Down

0 comments on commit 5ded835

Please sign in to comment.