From ae196875d2f45849055d2a03ac7f6762dc275284 Mon Sep 17 00:00:00 2001 From: julian merlo Date: Mon, 25 Mar 2024 19:08:52 -0300 Subject: [PATCH] Mapped txs array --- .../wormchainLogMessagePublishedMapper.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/blockchain-watcher/src/infrastructure/mappers/wormchain/wormchainLogMessagePublishedMapper.ts b/blockchain-watcher/src/infrastructure/mappers/wormchain/wormchainLogMessagePublishedMapper.ts index f1d06f62..4fbf3080 100644 --- a/blockchain-watcher/src/infrastructure/mappers/wormchain/wormchainLogMessagePublishedMapper.ts +++ b/blockchain-watcher/src/infrastructure/mappers/wormchain/wormchainLogMessagePublishedMapper.ts @@ -9,14 +9,14 @@ let logger: winston.Logger = winston.child({ module: "wormchainLogMessagePublish export const wormchainLogMessagePublishedMapper = ( log: WormchainLog -): LogFoundEvent | [] => { +): LogFoundEvent[] | [] => { const transactionAttributesMapped = transactionAttributes(log); if (transactionAttributesMapped.length === 0) { return []; } - const logMessages: any = []; + const logMessages: LogFoundEvent[] = []; transactionAttributesMapped.forEach((tx) => { logger.info( @@ -27,14 +27,14 @@ export const wormchainLogMessagePublishedMapper = ( name: "log-message-published", address: CORE_ADDRESS, chainId: 3104, - txHash: tx.hash, + txHash: tx.hash!, blockHeight: log.blockHeight, blockTime: log.timestamp, attributes: { - sender: tx.emitter, - sequence: tx.sequence, - payload: tx.payload, - nonce: tx.nonce, + sender: tx.emitter!, + sequence: tx.sequence!, + payload: tx.payload!, + nonce: tx.nonce!, consistencyLevel: 0, }, });