Fix wrong status on txs

This commit is contained in:
Mati Dastugue 2020-12-14 14:53:34 -03:00
parent 89a80bdb7a
commit 71375f9d64
1 changed files with 2 additions and 2 deletions

View File

@ -173,12 +173,12 @@ export const calculateTransactionStatus = (
if (tx.isExecuted && tx.isSuccessful) { if (tx.isExecuted && tx.isSuccessful) {
txStatus = TransactionStatus.SUCCESS txStatus = TransactionStatus.SUCCESS
} else if (tx.creationTx) {
txStatus = TransactionStatus.SUCCESS
} else if (tx.cancelled || nonce > tx.nonce) { } else if (tx.cancelled || nonce > tx.nonce) {
txStatus = TransactionStatus.CANCELLED txStatus = TransactionStatus.CANCELLED
} else if (tx.confirmations.size === threshold) { } else if (tx.confirmations.size === threshold) {
txStatus = TransactionStatus.AWAITING_EXECUTION txStatus = TransactionStatus.AWAITING_EXECUTION
} else if (tx.creationTx) {
txStatus = TransactionStatus.SUCCESS
} else if (!!tx.isPending) { } else if (!!tx.isPending) {
txStatus = TransactionStatus.PENDING txStatus = TransactionStatus.PENDING
} else { } else {