You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: remove browser navigation on account click when in initial connection flow (#22604)
<!--
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**
This PR removes browser navigation when a user clicks the account group
in the initial connection flow.
<!--
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?
-->
## **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: Fixes navigation on account group click in initial
connection flow
## **Related issues**
Fixes: https://consensyssoftware.atlassian.net/browse/WAPI-829
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user clicks account group
Given it's on initial connection flow
When user clicks account group
Then selected account is changed, and no navigation to in app browser happens
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
https://github.com/user-attachments/assets/fc58a302-7177-4d14-90c0-4b73a89eecf6
<!-- [screenshots/recordings] -->
### **After**
https://github.com/user-attachments/assets/d1a079aa-74bc-43e1-925d-cc4c964e1bec
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] 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]
> Selecting an account during the initial connection flow now only
updates the selected account group without showing a toast or
navigating; wiring and tests updated accordingly.
>
> - **MultichainAccountsConnectedList
(`MultichainAccountsConnectedList.tsx`)**
> - Add `isConnectionFlow` prop (default `false`).
> - Update `handleSelectAccount` to early-return in connection flow
(only sets `AccountTreeController.setSelectedAccountGroup`).
> - Maintain existing toast + `navigation.navigate(Routes.BROWSER.HOME)`
when not in connection flow; update hook deps.
> - **MultichainPermissionsSummary
(`MultichainPermissionsSummary.tsx`)**
> - Pass `isConnectionFlow={!isAlreadyConnected}` to
`MultichainAccountsConnectedList` and update memo deps.
> - **Tests (`MultichainAccountsConnectedList.test.tsx`)**
> - Add/adjust cases to verify: selection-only in connection flow; toast
+ navigation when not in connection flow.
> - Explicitly set `isConnectionFlow` in relevant tests and validate
correct group IDs and side effects.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
952b327. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Copy file name to clipboardExpand all lines: app/components/Views/MultichainAccounts/MultichainAccountsConnectedList/MultichainAccountsConnectedList.test.tsx
Copy file name to clipboardExpand all lines: app/components/Views/MultichainAccounts/MultichainAccountsConnectedList/MultichainAccountsConnectedList.tsx
0 commit comments