From a98828ca4f8c931212f5ee5ffe7b811b840ec358 Mon Sep 17 00:00:00 2001 From: Pilou <76021631+0xPilou@users.noreply.github.com> Date: Mon, 30 Jun 2025 11:21:09 +0200 Subject: [PATCH] fix: add unlockAvailable modifier to liquidity functions in FluidLocker --- packages/contracts/src/FluidLocker.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/contracts/src/FluidLocker.sol b/packages/contracts/src/FluidLocker.sol index 5aeb6f6..7d1987d 100644 --- a/packages/contracts/src/FluidLocker.sol +++ b/packages/contracts/src/FluidLocker.sol @@ -416,7 +416,7 @@ contract FluidLocker is Initializable, ReentrancyGuard, IFluidLocker { } /// @inheritdoc IFluidLocker - function provideLiquidity(uint256 supAmount) external payable nonReentrant onlyLockerOwner { + function provideLiquidity(uint256 supAmount) external payable nonReentrant onlyLockerOwner unlockAvailable { address weth = NONFUNGIBLE_POSITION_MANAGER.WETH9(); uint256 ethAmount = msg.value; @@ -455,7 +455,7 @@ contract FluidLocker is Initializable, ReentrancyGuard, IFluidLocker { uint128 liquidityToRemove, uint256 amount0ToRemove, uint256 amount1ToRemove - ) external nonReentrant onlyLockerOwner { + ) external nonReentrant onlyLockerOwner unlockAvailable { // ensure the locker has a position if (!_positionExists(tokenId)) { revert LOCKER_HAS_NO_POSITION(); @@ -495,6 +495,7 @@ contract FluidLocker is Initializable, ReentrancyGuard, IFluidLocker { external nonReentrant onlyLockerOwner + unlockAvailable returns (uint256 collectedWeth, uint256 collectedSup) { // ensure the locker has a position