Skip to content

Commit

Permalink
fix: returnAsset usage formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
xenide committed Dec 31, 2024
1 parent 7480072 commit 928ef07
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ReservoirPair.sol
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,10 @@ abstract contract ReservoirPair is IAssetManagedPair, ReservoirERC20, RGT {
uint256 lReserveOut = lIsToken0 ? aReserve0 : aReserve1;

if (lReserveOut - lTokenOutManaged < aAmount) {
assetManager.returnAsset(lIsToken0 ? aAmount - (lReserveOut - lTokenOutManaged) : 0, lIsToken0 ? 0 : aAmount - (lReserveOut - lTokenOutManaged));
assetManager.returnAsset(
lIsToken0 ? aAmount - (lReserveOut - lTokenOutManaged) : 0,
lIsToken0 ? 0 : aAmount - (lReserveOut - lTokenOutManaged)
);
require(_safeTransfer(aToken, aDestination, aAmount), TransferFailed());
} else {
revert TransferFailed();
Expand Down Expand Up @@ -458,7 +461,7 @@ abstract contract ReservoirPair is IAssetManagedPair, ReservoirERC20, RGT {

rAmtSkimmed = lTokenAmtManaged - type(uint104).max;

assetManager.returnAsset(aToken == token0 ? rAmtSkimmed : 0, aToken == token1 ? 0 :rAmtSkimmed);
assetManager.returnAsset(aToken == token0 ? rAmtSkimmed : 0, aToken == token1 ? rAmtSkimmed : 0);
address(aToken).safeTransfer(lRecoverer, rAmtSkimmed);
}
}
Expand Down

0 comments on commit 928ef07

Please sign in to comment.