Skip to content

Commit

Permalink
Merge pull request #236 from stellar/fix-operation-trace-code-bug
Browse files Browse the repository at this point in the history
Fix operation trace code bug
  • Loading branch information
chowbao authored Mar 26, 2024
2 parents 70448cd + 05b37a9 commit 75c9a9c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions internal/transform/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,17 @@ func TransformOperation(operation xdr.Operation, operationIndex int32, transacti
return OperationOutput{}, err
}

outputOperationResults, ok := transaction.Result.Result.OperationResults()
if !ok {
return OperationOutput{}, err
}

outputOperationResultCode := outputOperationResults[operationIndex].Code.String()
var outputOperationResultCode string
var outputOperationTraceCode string
operationResultTr, ok := outputOperationResults[operationIndex].GetTr()
outputOperationResults, ok := transaction.Result.Result.OperationResults()
if ok {
outputOperationTraceCode, err = mapOperationTrace(operationResultTr)
if err != nil {
return OperationOutput{}, err
outputOperationResultCode = outputOperationResults[operationIndex].Code.String()
operationResultTr, ok := outputOperationResults[operationIndex].GetTr()
if ok {
outputOperationTraceCode, err = mapOperationTrace(operationResultTr)
if err != nil {
return OperationOutput{}, err
}
}
}

Expand Down

0 comments on commit 75c9a9c

Please sign in to comment.