@@ -7,25 +7,21 @@ library Position {
77
88 struct Info {
99 // Amount of liquidity in the position
10- uint128 liquidity;
11-
10+ uint128 liquidity;
1211 // fee growth per uint of liquidity as of the last update to liquidity or fees owed
13- uint256 feeGrowthInside0LastX128;
12+ uint256 feeGrowthInside0LastX128;
1413 uint256 feeGrowthInside1LastX128;
15-
1614 //the fees owed to the position owner in token0/token1
1715 uint128 tokensOwed0;
1816 uint128 tokensOwed1;
1917 }
2018
21- function get (
22- mapping (bytes32 => Info) storage self ,
23- address owner ,
24- int24 tickLower ,
25- int24 tickUpper
26- ) internal view returns (Info storage position ) {
27- position =
28- self[keccak256 (abi.encodePacked (owner, tickLower, tickUpper))];
19+ function get (mapping (bytes32 => Info) storage self , address owner , int24 tickLower , int24 tickUpper )
20+ internal
21+ view
22+ returns (Info storage position )
23+ {
24+ position = self[keccak256 (abi.encodePacked (owner, tickLower, tickUpper))];
2925 }
3026
3127 function update (
@@ -36,10 +32,10 @@ library Position {
3632 ) internal {
3733 Info memory _self = self;
3834
39- if (liquidityDelta == 0 ) {
40- if (_self.liquidity == 0 ) revert Position__NoLiquidity ();
35+ if (liquidityDelta == 0 ) {
36+ if (_self.liquidity == 0 ) revert Position__NoLiquidity ();
4137 }
42- if (liquidityDelta != 0 ) {
38+ if (liquidityDelta != 0 ) {
4339 self.liquidity = liquidityDelta < 0
4440 ? _self.liquidity - uint128 (- liquidityDelta)
4541 : _self.liquidity + uint128 (liquidityDelta);
0 commit comments