-
Notifications
You must be signed in to change notification settings - Fork 11
fix: Extension is not switched to new account after creating it #1379
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Landing page preview |
} else { | ||
navigate(`/${activeRouteId}/clear-transactions/${routeId}`) | ||
} |
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.
This case should never happen. This would mean we're clearing transactions without the consent of the user. However, if we reach this point of the code, we can keep all transactions even if we switch the route because the target safe stays the same, or there are no transactions to clear. So navigate(
/${routeId})` is the only viable option.
Description:
Closes #1348
This PR addresses a persistent UX issue described in #1348, where the extension would not switch to the newly created account after the user completed the creation flow.
Context
The problem was caused by missing handling in
useLaunchRoute
for the case where a new route is created (i.e. therouteId
differs from the currentactiveRouteId
). While theonLaunch
callback was invoked, no navigation was triggered, leaving the extension and UI in an inconsistent state.Changes
useLaunchRoute
to differentiate between updating an existing account vs. creating a new one.onLaunch
callback (as before),