feat: add an interactive guided-fix flow for network mismatches - #1100
Merged
Junirezz merged 1 commit intoJul 29, 2026
Merged
Conversation
The existing NetworkWarningBanner (Junirezz#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 Junirezz#1038, which duplicates #(network-mismatch-warning), already resolved by Junirezz#608 for the detector/banner half of this.
|
@esthertitilayo-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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