Skip to content

Commit f7a7803

Browse files
committed
use timestampMs
1 parent eba5476 commit f7a7803

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/crons/websocket/events.custom.gateway.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,9 @@ export class EventsCustomGateway {
6161

6262
async pushEventsForTimestampMs(timestampMs: number): Promise<void> {
6363
try {
64-
const timestamp = timestampMs / 1000;
65-
6664
const allEvents = await this.eventsService.getEvents(
6765
new QueryPagination({ size: 10000 }),
68-
new EventsFilter({ before: timestamp, after: timestamp }),
66+
new EventsFilter({ before: timestampMs, after: timestampMs }),
6967
);
7068

7169
const eventsFilteredForBroadcast: Map<string, Events[]> = new Map();

src/crons/websocket/transaction.custom.gateway.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ export class TransactionsCustomGateway {
5454

5555
async pushTransactionsForTimestampMs(timestampMs: number): Promise<void> {
5656
try {
57-
const timestamp = timestampMs / 1000; // TODO: add support for timestampMs
5857
const allTransactions = await this.transactionService.getTransactions(
59-
new TransactionFilter({ before: timestamp, after: timestamp }),
58+
new TransactionFilter({ before: timestampMs, after: timestampMs }),
6059
new QueryPagination({ size: 10000 }) // TODO: handle pagination with more than 10k txs
6160
);
6261

0 commit comments

Comments
 (0)