Skip to content

Commit

Permalink
remove delta function
Browse files Browse the repository at this point in the history
  • Loading branch information
snreynolds committed Jun 27, 2024
1 parent f3c540d commit 2299f83
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions contracts/base/BaseLiquidityManagement.sol
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,6 @@ contract BaseLiquidityManagement is IBaseLiquidityManagement, SafeCallback {
if (delta1 < 0) currency1.settle(manager, address(this), uint256(int256(-delta1)), true);
}

//TODO @sara deprecate when moving to _closeThisDeltas for decreaes and collect
function _closeAllDeltas(Currency currency0, Currency currency1) internal {
(BalanceDelta delta) = manager.currencyDeltas(address(this), currency0, currency1);
int128 delta0 = delta.amount0();
int128 delta1 = delta.amount1();

// Mint a receipt for the tokens owed to this address.
if (delta0 > 0) currency0.take(manager, address(this), uint128(delta0), true);
if (delta1 > 0) currency1.take(manager, address(this), uint128(delta1), true);
// Burn the receipt for tokens owed to this address.
if (delta0 < 0) currency0.settle(manager, address(this), uint256(int256(-delta0)), true);
if (delta1 < 0) currency1.settle(manager, address(this), uint256(int256(-delta1)), true);
}

function _moveCallerDeltaToTokensOwed(
bool useAmount0,
BalanceDelta tokensOwed,
Expand Down

0 comments on commit 2299f83

Please sign in to comment.