Skip to content

Commit

Permalink
Fix operation trace code bug
Browse files Browse the repository at this point in the history
  • Loading branch information
chowbao committed Mar 26, 2024
1 parent 70448cd commit 05b37a9
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 05b37a9

Please sign in to comment.