Skip to content

Commit fe71d41

Browse files
committed
liquidity protection - removed legacy code
1 parent c9bafea commit fe71d41

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

contracts/helpers/TestLiquidityProtection.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ contract TestLiquidityProtection is LiquidityProtection, TestTime {
103103
removeAverageRateD: removeAverageRateD
104104
});
105105

106-
uint256 targetAmount = _removeLiquidityTargetAmount(
106+
(uint256 targetAmount,) = _removeLiquidityAmounts(
107107
poolToken,
108108
reserveToken,
109109
poolAmount,

contracts/liquidity-protection/LiquidityProtection.sol

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ contract LiquidityProtection is ILiquidityProtection, Utils, Owned, ReentrancyGu
506506
pos.reserveRateD
507507
);
508508

509-
uint256 targetAmount = _removeLiquidityTargetAmount(
509+
(uint256 targetAmount,) = _removeLiquidityAmounts(
510510
pos.poolToken,
511511
pos.reserveToken,
512512
pos.poolAmount,
@@ -643,26 +643,6 @@ contract LiquidityProtection is ILiquidityProtection, Utils, Owned, ReentrancyGu
643643
return posValue;
644644
}
645645

646-
/**
647-
* @dev returns the amount the provider will receive for removing liquidity
648-
*/
649-
function _removeLiquidityTargetAmount(
650-
IDSToken poolToken,
651-
IReserveToken reserveToken,
652-
uint256 poolAmount,
653-
uint256 reserveAmount,
654-
PackedRates memory packedRates
655-
) internal view returns (uint256) {
656-
(uint256 targetAmount,) = _removeLiquidityAmounts(
657-
poolToken,
658-
reserveToken,
659-
poolAmount,
660-
reserveAmount,
661-
packedRates
662-
);
663-
return targetAmount;
664-
}
665-
666646
/**
667647
* @dev returns the amount the provider will receive for removing liquidity
668648
* as well as the specific position value (before deficit reduction)

0 commit comments

Comments
 (0)