Skip to content

Commit

Permalink
consistent usage of _mapRecipient
Browse files Browse the repository at this point in the history
  • Loading branch information
saucepoint committed Sep 3, 2024
1 parent 8a43068 commit 3160edd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
123475
123465
Original file line number Diff line number Diff line change
@@ -1 +1 @@
130553
130544
2 changes: 1 addition & 1 deletion .forge-snapshots/PositionManager_collect_withTakePair.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
150653
150641
Original file line number Diff line number Diff line change
@@ -1 +1 @@
116196
116184
7 changes: 3 additions & 4 deletions src/PositionManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ contract PositionManager is
_settlePair(currency0, currency1);
return;
} else if (action == Actions.TAKE_PAIR) {
(Currency currency0, Currency currency1, address to) = params.decodeCurrencyPairAndAddress();
_takePair(currency0, currency1, to);
(Currency currency0, Currency currency1, address recipient) = params.decodeCurrencyPairAndAddress();
_takePair(currency0, currency1, _mapRecipient(recipient));
return;
} else if (action == Actions.SETTLE) {
(Currency currency, uint256 amount, bool payerIsUser) = params.decodeCurrencyUint256AndBool();
Expand Down Expand Up @@ -349,8 +349,7 @@ contract PositionManager is
_settle(currency1, caller, _getFullDebt(currency1));
}

function _takePair(Currency currency0, Currency currency1, address to) internal {
address recipient = _mapRecipient(to);
function _takePair(Currency currency0, Currency currency1, address recipient) internal {
_take(currency0, recipient, _getFullCredit(currency0));
_take(currency1, recipient, _getFullCredit(currency1));
}
Expand Down

0 comments on commit 3160edd

Please sign in to comment.