Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pooling interval to EventHistory hook #597

Merged
merged 8 commits into from
Nov 20, 2023

Conversation

damianmarti
Copy link
Collaborator

Description

Add a new poolingInterval optional parameter to useScaffoldEventHistory to be able to get the new events.

If we merge this PR, I will open a PR to update the doc.

Additional Information

Your ENS/address: damianmarti.eth

@carletex
Copy link
Member

carletex commented Nov 7, 2023

Hey @damianmarti , thanks for this!!

I always have to use the history hook + subscriber hook to get this behavior. So this might be better & simpler!

So we have pollingInterval in scaffold.config.ts which all the wagmi hooks with watch use. So to be more consistent... maybe it would be better to use that pollingInterval and just pass a watch flag to the hook?

(Just thinking out loud)

@damianmarti
Copy link
Collaborator Author

Hey @damianmarti , thanks for this!!

I always have to use the history hook + subscriber hook to get this behavior. So this might be better & simpler!

So we have pollingInterval in scaffold.config.ts which all the wagmi hooks with watch use. So to be more consistent... maybe it would be better to use that pollingInterval and just pass a watch flag to the hook?

(Just thinking out loud)

Makes sense!! Changed! Thanks!!

Copy link
Member

@rin-st rin-st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Copy link
Member

@carletex carletex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it and works great! Thanks all!

Now I guess there is some overlapping happening between useScaffoldEventHistory & useScaffoldEventSubscriber.

I'll create an issue or PR in the docs repo!

@carletex carletex merged commit 9680b07 into main Nov 20, 2023
1 check passed
@carletex carletex deleted the add-pooling-to-event-history-hook branch November 20, 2023 11:23
@carletex
Copy link
Member

carletex commented Nov 20, 2023

Created PR here: scaffold-eth/se-2-docs#38

@carletex carletex mentioned this pull request Nov 22, 2023
@github-actions github-actions bot mentioned this pull request Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants