Skip to content

Commit

Permalink
fix: follow up to #2
Browse files Browse the repository at this point in the history
  • Loading branch information
xenide committed Dec 31, 2024
1 parent 928ef07 commit e256b39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/asset-management/EulerV2Manager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,17 @@ contract EulerV2Manager is IAssetManager, Owned(msg.sender), RGT {
lAmount0Change = uint256(-aAmount0Change);
}
_doDivest(aPair, lToken0, lToken0Vault, lAmount0Change);
SafeTransferLib.safeApprove(address(lToken0), address(aPair), uint256(-aAmount0Change));
}
if (aAmount1Change < 0) {
uint256 lAmount1Change;
unchecked {
lAmount1Change = uint256(-aAmount1Change);
}
_doDivest(aPair, lToken1, lToken1Vault, lAmount1Change);
SafeTransferLib.safeApprove(address(lToken1), address(aPair), uint256(-aAmount1Change));
}

if (aAmount0Change < 0) SafeTransferLib.safeApprove(address(lToken0), address(aPair), uint256(-aAmount0Change));
if (aAmount1Change < 0) SafeTransferLib.safeApprove(address(lToken1), address(aPair), uint256(-aAmount1Change));
// transfer tokens to/from pair
aPair.adjustManagement(aAmount0Change, aAmount1Change);

Expand Down

0 comments on commit e256b39

Please sign in to comment.