-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix: Fix #28097 - Prevent redirect after adding network in Onboarding Settings #28165
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
@@ -381,7 +384,13 @@ function getValues(pendingApproval, t, actions, history, data) { | |||
nickname: pendingApproval.requestData.chainName, | |||
}); | |||
|
|||
history.push(DEFAULT_ROUTE); | |||
const locationPath = document.location.hash.replace('#', '/'); |
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.
Good fix. I noticed this too but wasn't sure how to fix it. I was trying use state.metamask.completedOnboarding
to determine whether to redirect, but didn't know how to access it here. document.location seems like it'll work
Builds ready [fff1dfd]
Page Load Metrics (2082 ± 109 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Prevents the post-add-network redirect from happening if the user is on the onboarding screen.
Related issues
Fixes: #28097
Manual testing steps
STR's are in #28097
Screenshots/Recordings
Before
After
Screen.Recording.2024-10-29.at.12.49.56.PM.mov
Pre-merge author checklist
Docs and MetaMask
Extension Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.