hasMinimumControlShares()

/**
   * Checks if a shareholder has the minimum number of shares required to control the Collective Portrait.
   *
   * @remarks
   * The minimum number of shares required to control the Collective Portrait is the number of shares that a shareholder must have to be able to control the Collective Portrait.
   * Control of the Collective Portrait is defined as being able to change the Collective Portrait's hash, minimum control shares, and share split.
   *
   *  @param {UserPortraitAddress | UserPortraitENSName} shareholder - The address or ENS name of the shareholder that the user would like to check if they have the minimum number of shares required to control the Collective Portrait.
   * @param {CollectivePortraitName | number} identity - The name of the Collective Portrait that the user would like to check if the shareholder has the minimum number of shares required to control for.
   * @returns {boolean} - True if the shareholder has the minimum number of shares required to control the Collective Portrait, false otherwise.
   * @beta
   * @async
   */
  hasMinimumControlShares(
    shareholder: UserPortraitAddress | UserPortraitENSName,
    identity: CollectivePortraitName | number,
  ): boolean {
    return (
      this.getMinimumControlShares(identity) <=
      this.getSharesByShareholder(identity, shareholder)
    );
  }

Last updated