Skip to content

Commit

Permalink
Pass block number when fetching a transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
prathamesh0 committed Nov 3, 2022
1 parent db4ad61 commit f584f0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/uni-info-watcher/src/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ import {
eventProcessingEthCallDuration,
getFullTransaction,
getFullBlock,
StateKind,
cachePrunedEntitiesCount
StateKind
} from '@cerc-io/util';
import { EthClient } from '@cerc-io/ipld-eth-client';
import { StorageLayout, MappingKey } from '@cerc-io/solidity-mapper';
Expand Down Expand Up @@ -611,6 +610,7 @@ export class Indexer implements IndexerInterface {
parentHash
}: DeepPartial<BlockProgress>): Promise<[BlockProgress, DeepPartial<Event>[]]> {
assert(blockHash);
assert(blockNumber);

const events = await this._uniClient.getEvents(blockHash);

Expand All @@ -624,7 +624,7 @@ export class Indexer implements IndexerInterface {

await Promise.all(
Array.from(txHashSet).map(async (txHash: any) => {
const transaction = await getFullTransaction(this._ethClient, txHash);
const transaction = await getFullTransaction(this._ethClient, txHash, blockNumber);
transactionsMap.set(txHash, transaction);
})
);
Expand Down

0 comments on commit f584f0d

Please sign in to comment.