Skip to content

Commit

Permalink
Fix clear check
Browse files Browse the repository at this point in the history
  • Loading branch information
hieronx committed Sep 23, 2024
1 parent f5336ff commit 25bbb14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operators/InterestDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 25bbb14

Please sign in to comment.