Skip to content

Commit

Permalink
Add json field to operations export (#270)
Browse files Browse the repository at this point in the history
* Add json field to operations export

* Update unit tests
  • Loading branch information
chowbao authored Jul 26, 2024
1 parent 741ee9b commit 37b7123
Show file tree
Hide file tree
Showing 3 changed files with 269 additions and 32 deletions.
23 changes: 12 additions & 11 deletions internal/transform/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,18 @@ func TransformOperation(operation xdr.Operation, operationIndex int32, transacti
outputLedgerSequence := utils.GetLedgerSequence(ledgerCloseMeta)

transformedOperation := OperationOutput{
SourceAccount: outputSourceAccount,
SourceAccountMuxed: outputSourceAccountMuxed.String,
Type: outputOperationType,
TypeString: outputOperationTypeString,
TransactionID: outputTransactionID,
OperationID: outputOperationID,
OperationDetails: outputDetails,
ClosedAt: outputCloseTime,
OperationResultCode: outputOperationResultCode,
OperationTraceCode: outputOperationTraceCode,
LedgerSequence: outputLedgerSequence,
SourceAccount: outputSourceAccount,
SourceAccountMuxed: outputSourceAccountMuxed.String,
Type: outputOperationType,
TypeString: outputOperationTypeString,
TransactionID: outputTransactionID,
OperationID: outputOperationID,
OperationDetails: outputDetails,
ClosedAt: outputCloseTime,
OperationResultCode: outputOperationResultCode,
OperationTraceCode: outputOperationTraceCode,
LedgerSequence: outputLedgerSequence,
OperationDetailsJSON: outputDetails,
}

return transformedOperation, nil
Expand Down
Loading

0 comments on commit 37b7123

Please sign in to comment.