From 3160edd0a75e702d8488974232f24990e1dbce8b Mon Sep 17 00:00:00 2001 From: saucepoint Date: Tue, 3 Sep 2024 13:37:40 -0400 Subject: [PATCH] consistent usage of _mapRecipient --- .../PositionManager_burn_nonEmpty_native_withTakePair.snap | 2 +- .../PositionManager_burn_nonEmpty_withTakePair.snap | 2 +- .forge-snapshots/PositionManager_collect_withTakePair.snap | 2 +- .../PositionManager_decreaseLiquidity_withTakePair.snap | 2 +- src/PositionManager.sol | 7 +++---- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.forge-snapshots/PositionManager_burn_nonEmpty_native_withTakePair.snap b/.forge-snapshots/PositionManager_burn_nonEmpty_native_withTakePair.snap index f05d191c9..5cac1d241 100644 --- a/.forge-snapshots/PositionManager_burn_nonEmpty_native_withTakePair.snap +++ b/.forge-snapshots/PositionManager_burn_nonEmpty_native_withTakePair.snap @@ -1 +1 @@ -123475 \ No newline at end of file +123465 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_burn_nonEmpty_withTakePair.snap b/.forge-snapshots/PositionManager_burn_nonEmpty_withTakePair.snap index b180de085..9ad20e49d 100644 --- a/.forge-snapshots/PositionManager_burn_nonEmpty_withTakePair.snap +++ b/.forge-snapshots/PositionManager_burn_nonEmpty_withTakePair.snap @@ -1 +1 @@ -130553 \ No newline at end of file +130544 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_collect_withTakePair.snap b/.forge-snapshots/PositionManager_collect_withTakePair.snap index 8fb961f41..e1d82d967 100644 --- a/.forge-snapshots/PositionManager_collect_withTakePair.snap +++ b/.forge-snapshots/PositionManager_collect_withTakePair.snap @@ -1 +1 @@ -150653 \ No newline at end of file +150641 \ No newline at end of file diff --git a/.forge-snapshots/PositionManager_decreaseLiquidity_withTakePair.snap b/.forge-snapshots/PositionManager_decreaseLiquidity_withTakePair.snap index 75b62f53c..8ec8cc23c 100644 --- a/.forge-snapshots/PositionManager_decreaseLiquidity_withTakePair.snap +++ b/.forge-snapshots/PositionManager_decreaseLiquidity_withTakePair.snap @@ -1 +1 @@ -116196 \ No newline at end of file +116184 \ No newline at end of file diff --git a/src/PositionManager.sol b/src/PositionManager.sol index 78a1aa710..83c982a28 100644 --- a/src/PositionManager.sol +++ b/src/PositionManager.sol @@ -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(); @@ -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)); }