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

Remove initialData in nonce and session #349

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

JamieLottering
Copy link
Contributor

@JamieLottering JamieLottering commented Feb 9, 2024

It appears that in @tanstack/react-query v5 and up the query will not be fetched on mount if initialData is anything other than undefined. This means that the ckSiweNonce and ckSiweSession queries don't fire for the first time until their respective intervals have elapsed.

This commit removes the initialData for both of these queries in order to restore previous functionality.

Versions used to reproduce issue:
"@tanstack/react-query": "5.18.1" & "connectkit": "1.7.1"

It appears that in @tanstack/react-query v5 and up the query will not be fetched on mount if `initialData` is set. This means that the `ckSiweNonce` and `ckSiweSession` queries don't fire until their respective intervals have elapsed.

This commit removes the `initialData` for both of these queries in order to restore previous functionality.
Copy link

vercel bot commented Feb 9, 2024

@JamieLottering is attempting to deploy a commit to the Avara Team on Vercel.

A member of the Team first needs to authorize it.

@JamieLottering
Copy link
Contributor Author

Hi team, I appreciate you are very busy but I am respectfully asking for some eyes on this. Currently in the process of migrating to viem 2.0 (which requires us to update wagmi to 2.0, react-query to v5, and connectkit to 1.7) and this is the last issue keeping us from wrapping up.

Copy link

vercel bot commented Feb 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
connectkit-cra ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 15, 2024 1:31am
connectkit-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 15, 2024 1:31am
connectkit-testbench ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 15, 2024 1:31am
connectkit-vite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 15, 2024 1:31am

Copy link
Member

@lochie lochie left a comment

Choose a reason for hiding this comment

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

Good catch @JamieLottering! Was on my list to debug why SIWE had an issue when first trying to connect and this seems to resolve those problems 🙌

@lochie lochie merged commit 2328989 into family:main Feb 15, 2024
6 checks passed
@JamieLottering
Copy link
Contributor Author

Good catch @JamieLottering! Was on my list to debug why SIWE had an issue when first trying to connect and this seems to resolve those problems 🙌

Awesome, thank you for merging!!

@lochie
Copy link
Member

lochie commented Feb 27, 2024

This update is now in ConnectKit 1.7.2, thanks @JamieLottering 🙌

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.

2 participants