We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
useContractEvents
1 parent e4ba47b commit 58787a2Copy full SHA for 58787a2
.changeset/witty-ducks-lie.md
@@ -0,0 +1,5 @@
1
+---
2
+"thirdweb": patch
3
4
+
5
+Fixed `useContractEvents` persisting previous data when filters change
packages/thirdweb/src/react/core/hooks/contract/useContractEvents.ts
@@ -92,7 +92,7 @@ export function useContractEvents<
92
() =>
93
events?.reduce((acc, curr) => {
94
// we can use the event hash as a unique identifier?
95
- return `${acc}${curr.hash}_`;
+ return `${acc}${curr.hash}${curr.topics.join("")}_`;
96
}, "") || "__all__",
97
[events],
98
);
0 commit comments