Skip to content

Extension is not switched to new account after creating it #1348

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

Closed
jfschwarz opened this issue Apr 10, 2025 · 0 comments · Fixed by #1379
Closed

Extension is not switched to new account after creating it #1348

jfschwarz opened this issue Apr 10, 2025 · 0 comments · Fixed by #1379
Assignees

Comments

@jfschwarz
Copy link
Collaborator

I think we briefly discussed this before. To me it doesn't look like a race condition but it's a persistent issue, that causes quite some confusion in demos (and presumably also for actual users).

@juliopavila juliopavila self-assigned this Apr 11, 2025
@juliopavila juliopavila reopened this Apr 15, 2025
frontendphil added a commit that referenced this issue Apr 17, 2025
## **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. the `routeId` differs from the
current `activeRouteId`). While the `onLaunch` callback was invoked, no
navigation was triggered, leaving the extension and UI in an
inconsistent state.

### Changes  
- Updated `useLaunchRoute` to differentiate between updating an existing
account vs. creating a new one.
- When a new route is detected, we now:
  - Invoke the `onLaunch` callback (as before),
  - Immediately navigate to the corresponding route.
- For existing routes with pending transactions, we preserve the
existing behavior and prompt for user confirmation.

---------

Co-authored-by: Philipp Giese <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants