feat: add an interactive guided-fix flow for network mismatches - #1097
Closed
Junirezz wants to merge 1 commit into
Closed
feat: add an interactive guided-fix flow for network mismatches#1097Junirezz wants to merge 1 commit into
Junirezz wants to merge 1 commit into
Conversation
The existing NetworkWarningBanner (#608) already detects a wallet/app network mismatch and shows static switch instructions, but there was no interactive way to act on it: the user had to manually switch networks in Freighter and wait up to 10s for the next background poll to notice. Add a "Show me how to fix this" action on the banner that opens a guided NetworkMismatchGuideModal: numbered steps to switch networks in Freighter, and a "check again" button that calls a new checkNow() escape hatch on useWalletNetwork to re-read the network immediately instead of waiting for the poll interval. The modal reports back whether the switch worked and auto-closes once the mismatch is confirmed resolved, instead of just having the banner silently disappear. Adds i18n strings (en/es) for the guide, and test coverage for useWalletNetwork and the new modal — neither had tests before. Related to #1038, which duplicates #(network-mismatch-warning), already resolved by #608 for the detector/banner half of this.
Contributor
|
Closing — this was opened under the wrong GitHub account (repo owner's, not the assigned contributor's) due to a tooling mistake on my end. Re-opening correctly from a fork under the right account. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1038.
Heads up for reviewers: #1038's title overlaps heavily with the already-merged "persistent network mismatch warning" PR (#608), which added the detector (
useWalletNetwork) and the static warning banner (NetworkWarningBanner). This PR builds the piece that was still missing — the actual guided fix flow — rather than re-doing the detector/banner:NetworkMismatchGuideModal: numbered steps to switch networks in Freighter, plus a "check again" button.useWalletNetworkwith acheckNow()escape hatch (andisCheckingstate) so "check again" re-reads the wallet's network immediately instead of waiting up to the existing 10s poll interval.enandes, matching the existing catalog structure.Test plan
useWalletNetwork.test.tsandNetworkMismatchGuideModal.test.tsx(neither existed before) — 12/12 passednpx tsc -b— no new type errors (one pre-existing, unrelatedToastCenter.tsxerror present onmainbefore this change too)🤖 Generated with Claude Code