fix isExecute in useEstimateTransactionGas (#1981)

* fix isExecute in useEstimateTransactionGas

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
This commit is contained in:
nicolas 2021-03-03 05:46:17 -03:00 committed by GitHub
parent 5fddc1015e
commit 7cee0a4fe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -39,7 +39,11 @@ export const checkIfTxIsExecution = (
txConfirmations?: number,
txType?: string,
): boolean => {
if (threshold === 1 || sameString(txType, 'spendingLimit') || txConfirmations === threshold) {
if (
threshold === 1 ||
sameString(txType, 'spendingLimit') ||
(txConfirmations !== undefined && txConfirmations >= threshold)
) {
return true
}