diff --git a/process/transactionProcessor.go b/process/transactionProcessor.go index 186df067..ff0688be 100644 --- a/process/transactionProcessor.go +++ b/process/transactionProcessor.go @@ -480,6 +480,12 @@ func (tp *TransactionProcessor) computeTransactionStatus(tx *transaction.ApiTran } } + if hasPendingSCR(allScrs) { + return &data.ProcessStatusResponse{ + Status: string(transaction.TxStatusPending), + } + } + allLogs, err = tp.addMissingLogsOnProcessingExceptions(tx, allLogs, allScrs) if err != nil { log.Warn("error in TransactionProcessor.computeTransactionStatus on addMissingLogsOnProcessingExceptions call", "error", err) @@ -507,6 +513,16 @@ func (tp *TransactionProcessor) computeTransactionStatus(tx *transaction.ApiTran } } +func hasPendingSCR(scrs []*transaction.ApiTransactionResult) bool { + for _, scr := range scrs { + if scr.Status == transaction.TxStatusPending { + return true + } + } + + return false +} + func checkIfFailed(logs []*transaction.ApiLogs) (bool, string) { found, reason := findIdentifierInLogs(logs, internalVMErrorsEventIdentifier) if found {