diff --git a/internal/entities/rpc.go b/internal/entities/rpc.go index 4158678..70d914d 100644 --- a/internal/entities/rpc.go +++ b/internal/entities/rpc.go @@ -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"` @@ -41,7 +42,7 @@ 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"` @@ -49,7 +50,7 @@ type Transaction struct { ResultMetaXDR string `json:"resultMetaXdr"` Ledger int64 `json:"ledger"` DiagnosticEventsXDR string `json:"diagnosticEventsXdr"` - CreatedAt int64 `json:"createdAt"` + CreatedAt uint32 `json:"createdAt"` } type RPCGetTransactionsResult struct { diff --git a/internal/services/ingest.go b/internal/services/ingest.go index 7bf0782..739c0fe 100644 --- a/internal/services/ingest.go +++ b/internal/services/ingest.go @@ -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, } @@ -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,