Skip to content

Commit

Permalink
fix: Bound generated timestamps for tests (#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapk00 authored Sep 22, 2023
1 parent aa6553b commit 31641c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/calm-olives-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farcaster/core": patch
---

fix: Bound generated timestamps for tests
2 changes: 1 addition & 1 deletion packages/core/src/factories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ const OnChainEventFactory = Factory.define<protobufs.OnChainEvent>(() => {
fid: FidFactory.build(),
blockNumber: faker.datatype.number({ min: 1, max: 100_000 }),
blockHash: BlockHashFactory.build(),
blockTimestamp: Math.floor(faker.datatype.datetime({ min: FARCASTER_EPOCH }).getTime() / 1000),
blockTimestamp: Math.floor(faker.datatype.datetime({ min: FARCASTER_EPOCH, max: Date.now() }).getTime() / 1000),
transactionHash: TransactionHashFactory.build(),
logIndex: faker.datatype.number({ min: 0, max: 1_000 }),
});
Expand Down

0 comments on commit 31641c1

Please sign in to comment.