Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
miiu96 committed Sep 5, 2024
1 parent 2ebe564 commit 4f7ecad
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions process/transactionProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,12 @@ func (tp *TransactionProcessor) computeTransactionStatus(tx *transaction.ApiTran
}
}

//isRelayedV3, status := checkIfRelayedV3Completed(allLogs, tx)
//if isRelayedV3 {
// return &data.ProcessStatusResponse{
// Status: status,
// }
//}
isRelayedV3, status := checkIfRelayedV3Completed(tx)
if isRelayedV3 {
return &data.ProcessStatusResponse{
Status: status,
}
}

failed, reason = checkIfFailed(allLogs)
if failed {
Expand Down Expand Up @@ -588,15 +588,11 @@ func checkIfCompleted(logs []*transaction.ApiLogs) bool {
return found
}

func checkIfRelayedV3Completed(logs []*transaction.ApiLogs, tx *transaction.ApiTransactionResult) (bool, string) {
func checkIfRelayedV3Completed(tx *transaction.ApiTransactionResult) (bool, string) {
if len(tx.InnerTransactions) == 0 {
return false, string(transaction.TxStatusPending)
}

if len(logs) < len(tx.InnerTransactions) {
return true, string(transaction.TxStatusPending)
}

return true, string(transaction.TxStatusSuccess)
}

Expand Down

0 comments on commit 4f7ecad

Please sign in to comment.