Commit 2e8d577
fix: updated routes for backup srp settings cp-13.12.0 (#38544)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
This PR updates the navigation routes in the onboarding flow to track
when users access privacy settings from the "Manage default settings"
reminder on the wallet creation successful page.
The problem was in the onboarding flow redirection logic. Looking at
onboarding-flow.tsx:
` useEffect(() => {
if (completedOnboarding && !isFromReminder && !openedWithSidepanel) {
navigate(DEFAULT_ROUTE);
}
}, [navigate, completedOnboarding, isFromReminder,
openedWithSidepanel]);
`
Issue:
- When a user already completed onboarding clicks "Manage default
settings" on the wallet creation successful page
- They would navigate to the Privacy Settings page
- BUT the isFromReminder query param was NOT being passed
- The onboarding-flow.tsx would detect:
- completedOnboarding = true ✅
- isFromReminder = false ❌ (missing!)
- This triggered the redirect: navigate(DEFAULT_ROUTE) — kicking users
out of the settings flow
The Fix:
The fix ensures the isFromReminder=true query parameter is:
- Added when navigating from "Creation Successful" → "Privacy Settings"
- Preserved when navigating from "Privacy Settings" → "Completion Route"
Before: Users clicking "Manage default settings" would get unexpectedly
redirected away and couldn't complete configuring their privacy
settings.
After: Users can properly navigate through the "Manage default settings"
flow without being kicked out.
Jira Link: https://consensyssoftware.atlassian.net/browse/SL-367
[](https://codespaces.new/MetaMask/metamask-extension/pull/38544?quickstart=1)
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: null
## **Related issues**
Fixes:
## **Manual testing steps**
1. Go to this page...
2.
3.
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
https://github.com/user-attachments/assets/5cd6a3e3-e812-4cb9-be04-e3a06951e6f9
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Preserves the `isFromReminder=true` query param from Creation
Successful → Privacy Settings → Completion to avoid unintended redirects
for post-onboarding reminders.
>
> - **Onboarding flow**:
> - Pass `?isFromReminder=true` when navigating from
`ui/pages/onboarding-flow/creation-successful/creation-successful.tsx`
to `ONBOARDING_PRIVACY_SETTINGS_ROUTE`.
> - In `ui/pages/onboarding-flow/privacy-settings/privacy-settings.tsx`,
read `isFromReminder` via `useLocation` and conditionally navigate to
`ONBOARDING_COMPLETION_ROUTE` with the same query param to preserve
context.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
017d396. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Co-authored-by: Chaitanya Potti <[email protected]>1 parent 8a2cf93 commit 2e8d577
File tree
2 files changed
+15
-3
lines changed- ui/pages/onboarding-flow
- creation-successful
- privacy-settings
2 files changed
+15
-3
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| |||
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
176 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
177 | 187 | | |
178 | 188 | | |
179 | 189 | | |
| |||
0 commit comments