fix: prevent switch network modal when user is disconnected
Description
Fixes an issue where the "Switch Network" modal would incorrectly appear even when the user was disconnected.
Type of change
- [ ] Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Associated Issues
For Linear issues: Closes APKT-3032 For GH issues: closes #4476
Showcase
https://imgur.com/a/KzK2ACB
Checklist
- [X] Code in this PR is covered by automated tests (Unit tests, E2E tests)
- [X] My changes generate no new warnings
- [X] I have reviewed my own code
- [X] I have filled out all required sections
- [X] I have tested my changes on the preview link
- [ ] Approver of this PR confirms that the changes are tested on the preview link
⚠️ No Changeset found
Latest commit: 54c832e04cfb4f2d1718c956a294957f6ba2dc71
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
@venturars is attempting to deploy a commit to the Reown Team on Vercel.
A member of the Team first needs to authorize it.
@venturars do you have repro steps for this? Also see CONTRIBUTORS.md - we're happy for contributions but there's no tests here
Hello @arein, I've edited the PR. The link was broken, but you can now see my manual test of this code.
@venturars sorry I've just saw the screen record you've shared, you're switching a network on the wallet and the AppKit instance on Demo app is supports only Mainnet (which is possibly when you play around with enabling disabling the networks you've disabled most of the networks). So in this case this screen is expected to be shown.
Closing this as it's expected behaviour. If there is still an issue, can you consider opening an issue with clear set of reproduction steps so we can tackle this? Thank you!
@enesozturk, if you open the associated GitHub issue, you can see this link: https://imgur.com/a/UYAdva8. The link put in the PR showcase is now fixed. In the issue, you have the current behavior, and you also have the code of a demo that can be downloaded and reproduced, just like the video
Hey @arein @enesozturk, do we have any updates on this? As I mentioned, the link provided in the closed PR was recorded with the changes that made it work, but the issue still contains a link showing the current behaviour. I understand if my proposal isn't accepted, but my team is waiting for a solution because this issue is affecting our product
@venturars you mentioned you have no capacity to bring this over the finish line. So the ask is for us to prioritize the issue you linked originally correct?
@arein Yes, when I opened the issue, I also submitted this PR as a possible solution because I noticed it might help. However, I haven’t done extensive testing on it — only in the demo app you provided in the AppKit repo and in my own application.
The important thing here is that the bug is currently happening, and we’re working with the workaround described in the issue. But we’d be much happier if it’s resolved in the next release
@venturars can you pls connect with me on Telegram or X? So we can discuss prioritizing this https://x.com/cyberdrk