-
Notifications
You must be signed in to change notification settings - Fork 329
fix: useFundCardSetupOnrampEventListeners unmount reset #2182
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
base: main
Are you sure you want to change the base?
fix: useFundCardSetupOnrampEventListeners unmount reset #2182
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@teimurjan is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
packages/onchainkit/src/fund/hooks/useFundCardSetupOnrampEventListeners.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty for the PR! Definitely an issue that should be fixed. I think we might still the issue with the proposed changes in certain circumstances. Let me know what you think 👍
packages/onchainkit/src/fund/hooks/useFundCardSetupOnrampEventListeners.ts
Show resolved
Hide resolved
@teimurjan Heyo, sorry for all the back and forth but now it looks like the test coverage is under 100%. We need it at 100% to merge. Btw, you can check that locally by doing |
5a1d5ba
to
bf22ac4
Compare
I get it. I've just committed a fix with a new test checking the missing lines. |
What changed? Why?
Updated cleanup of useFundCardSetupOnrampEventListeners on unmount. Currently, if the provider unmounts within 3000ms after an action, state mutation happens on an unmounted provider.
Notes to reviewers
How has it been tested?