From 928ef0748aa098fa0b03f29d78622d1a8b0f6974 Mon Sep 17 00:00:00 2001 From: "A.L." Date: Tue, 31 Dec 2024 17:12:44 +0800 Subject: [PATCH] fix: returnAsset usage formatting --- src/ReservoirPair.sol | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ReservoirPair.sol b/src/ReservoirPair.sol index 23646a37..c6f7e7c2 100644 --- a/src/ReservoirPair.sol +++ b/src/ReservoirPair.sol @@ -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(); @@ -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); } }