Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Commit

Permalink
Fix: approve&execute conditions for non-owners (5afe#3419)
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh authored Feb 3, 2022
1 parent 4459ea0 commit fc89458
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/logic/hooks/useEstimateTransactionGas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ export const checkIfTxIsApproveAndExecution = (
txType?: string,
preApprovingOwner?: string,
): boolean => {
if (preApprovingOwner) {
return txConfirmations + 1 === threshold || isSpendingLimit(txType)
}

return threshold === 1
if (txConfirmations === threshold) return false
if (!preApprovingOwner) return false
return txConfirmations + 1 === threshold || isSpendingLimit(txType)
}

export const checkIfTxIsCreation = (txConfirmations: number, txType?: string): boolean =>
Expand Down

0 comments on commit fc89458

Please sign in to comment.