Skip to content

Commit

Permalink
accounting for protocol 22 related RPC changes (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
gouthamp-stellar authored Oct 31, 2024
1 parent 8469e6f commit b811b91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions internal/entities/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type RPCGetTransactionResult struct {
OldestLedger int64 `json:"oldestLedger"`
OldestLedgerCloseTime string `json:"oldestLedgerCloseTime"`
ApplicationOrder int64 `json:"applicationOrder"`
Hash string `json:"txHash"`
EnvelopeXDR string `json:"envelopeXdr"`
ResultXDR string `json:"resultXdr"`
ResultMetaXDR string `json:"resultMetaXdr"`
Expand All @@ -41,15 +42,15 @@ type RPCGetTransactionResult struct {

type Transaction struct {
Status RPCStatus `json:"status"`
Hash string `json:"hash"`
Hash string `json:"txHash"`
ApplicationOrder int64 `json:"applicationOrder"`
FeeBump bool `json:"feeBump"`
EnvelopeXDR string `json:"envelopeXdr"`
ResultXDR string `json:"resultXdr"`
ResultMetaXDR string `json:"resultMetaXdr"`
Ledger int64 `json:"ledger"`
DiagnosticEventsXDR string `json:"diagnosticEventsXdr"`
CreatedAt int64 `json:"createdAt"`
CreatedAt uint32 `json:"createdAt"`
}

type RPCGetTransactionsResult struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/services/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (m *ingestService) ingestPayments(ctx context.Context, ledgerTransactions [
TransactionID: utils.TransactionID(int32(tx.Ledger), int32(tx.ApplicationOrder)),
TransactionHash: tx.Hash,
FromAddress: utils.SourceAccount(op, txEnvelopeXDR),
CreatedAt: time.Unix(tx.CreatedAt, 0),
CreatedAt: time.Unix(int64(tx.CreatedAt), 0),
Memo: txMemo,
MemoType: txMemoType,
}
Expand Down Expand Up @@ -231,7 +231,7 @@ func (m *ingestService) processTSSTransactions(ctx context.Context, ledgerTransa
Code: txCode,
EnvelopeXDR: tx.EnvelopeXDR,
ResultXDR: tx.ResultXDR,
CreatedAt: tx.CreatedAt,
CreatedAt: int64(tx.CreatedAt),
}
payload := tss.Payload{
RpcGetIngestTxResponse: tssGetIngestResponse,
Expand Down

0 comments on commit b811b91

Please sign in to comment.