Skip to content

Commit

Permalink
feat: remove _ownersCount
Browse files Browse the repository at this point in the history
  • Loading branch information
iavl committed Mar 28, 2024
1 parent 4462c72 commit b62423c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/ProxyAdminMultiSig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ contract ProxyAdminMultiSig is IErrors {

// multi-sig wallet
EnumerableSet.AddressSet internal _owners;
uint256 internal _ownersCount;
uint256 internal _threshold;

// proposals
Expand Down Expand Up @@ -56,13 +55,13 @@ contract ProxyAdminMultiSig is IErrors {
revert DuplicatedOwner(owner);
}
}
_ownersCount = _owners.length();
uint256 ownersCount = _owners.length();
_threshold = threshold;
if (threshold > _ownersCount) {
revert ThresholdExceedsOwnersCount(threshold, _ownersCount);
if (threshold > ownersCount) {
revert ThresholdExceedsOwnersCount(threshold, ownersCount);
}

emit Events.Setup(msg.sender, owners, _ownersCount, threshold);
emit Events.Setup(msg.sender, owners, ownersCount, threshold);
}

/// @dev proposes a new admin or implementation for a proxy
Expand Down

0 comments on commit b62423c

Please sign in to comment.