From 25bbb144313cd22393656831ce3e4542e5bf32f0 Mon Sep 17 00:00:00 2001 From: Jeroen Offerijns Date: Tue, 24 Sep 2024 00:02:48 +0200 Subject: [PATCH] Fix clear check --- src/operators/InterestDistributor.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/operators/InterestDistributor.sol b/src/operators/InterestDistributor.sol index 9732c616..a2ce5291 100644 --- a/src/operators/InterestDistributor.sol +++ b/src/operators/InterestDistributor.sol @@ -70,7 +70,7 @@ contract InterestDistributor is IInterestDistributor { /// @inheritdoc IInterestDistributor function clear(address vault, address controller) external { require(!IERC7540Vault(vault).isOperator(controller, address(this)), "InterestDistributor/still-an-operator"); - require(_users[vault][controller].shares > 0, "InterestDistributor/no-outstanding-shares"); + require(_users[vault][controller].lastUpdate > 0, "InterestDistributor/unknown-controller"); delete _users[vault][controller]; emit Clear(vault, controller);