Skip to content

Commit

Permalink
fix: add blockTag to observerId to avoid id collisions (#2019)
Browse files Browse the repository at this point in the history
* Add `blockTag` to `observerId` to avoid id collisions

* Create late-walls-agree.md

---------

Co-authored-by: jxom <jakemoxey@gmail.com>
  • Loading branch information
youPickItUp and jxom committed Mar 26, 2024
1 parent 8a173cc commit 81ddc5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/late-walls-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Added `blockTag` to `observerId` in `watchBlocks` to avoid id collisions.
1 change: 1 addition & 0 deletions src/actions/public/watchBlocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export function watchBlocks<
const observerId = stringify([
'watchBlocks',
client.uid,
blockTag,
emitMissed,
emitOnBegin,
includeTransactions,
Expand Down

0 comments on commit 81ddc5e

Please sign in to comment.