isFinalApproval method

bool isFinalApproval(
  1. int threshold
)

Check if this would be the final approval

Parameters:

  • threshold: The multisig threshold

Returns: true if one more approval would execute

Example:

if (storage.isFinalApproval(signatories.threshold)) {
  // Next approval will execute the transaction
  print('This will be the final approval');
}

Implementation

bool isFinalApproval(final int threshold) {
  return approvals.length == threshold - 1;
}