-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
refactor: disable disconnected call for siwe if not connected #2364
refactor: disable disconnected call for siwe if not connected #2364
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Test case?
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.
Looks good but a test would be nice 🙏
This is something that could be tested with integration tests, not E2E because it's a decision when to trigger SIWE actions rather than any affect to how they are working. And this change is just effecting the modal when it's in If we decide to test these kind of details, it'll bring too much workload to our E2E tests which their right place is integration tests. Maybe we could consider having them with Jest rather than Playwright |
Changes
When we not connected, we are still calling the client's disconnect function and if the SIWE enabled, this causing unnecessary async function and this causing the modal to be closed with a promise delay.
Also considered
We could do optimistic updates and directly close the modal and make the
signOut
calls on the background. While this might sound good, might cause some issues for certain situations