Skip to content

[pull] main from MetaMask:main#29

Merged
pull[bot] merged 3 commits into
Reality2byte:mainfrom
MetaMask:main
Jul 30, 2025
Merged

[pull] main from MetaMask:main#29
pull[bot] merged 3 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull

@pull pull Bot commented Jul 30, 2025

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

huggingbot and others added 3 commits July 30, 2025 06:36
<!--
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 password strength analytics tracking from wallet setup
flows. The password strength metric was being tracked in various events
(WALLET_CREATED, WALLET_IMPORTED, PASSWORD_CHANGED) but is no longer
needed, so this refactoring removes these analytics properties.

Changes include:
- Removed `password_strength` property from WALLET_CREATED analytics
event
- Removed `password_strength` property from WALLET_IMPORTED analytics
event
- Removed `password_strength` property from PASSWORD_CHANGED analytics
event
- Updated corresponding e2e tests to remove password strength assertions

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes:

## **Manual testing steps**

1. Create a new wallet and verify analytics events still fire correctly
2. Import a wallet and verify analytics events still fire correctly
3. Reset password and verify analytics events still fire correctly
4. Run e2e tests to ensure they pass with updated assertions

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- Analytics events included password_strength property -->

### **After**

<!-- Analytics events no longer include password_strength property -->

## **Pre-merge author checklist**

- [X] 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).
- [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-mobile/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.
<!--
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**

Fixes an issue with running Snaps tests via the Flask E2E smoke test
workflow. `Gestures.typeText` does not work with web elements so we
revert back to `LegacyGestures.typeInWebElement` instead.
<!--
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 fixes the race condition that may occur when the user logs with
`multichainAccountsEnabled`. `AccountTreeController.init` is run after
every login however the UI will become available before the execution is
done. The initialisation is now awaited after logging in.

## **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: #17606

## **Manual testing steps**

There is no way to test this bug without manually adding a delay on the
main branch.

In the file `app/multichain-accounts/AccountTreeInitService/index.ts`
modify `initializeAccountTree` to this code
```
 initializeAccountTree = async (): Promise<void> => {
    const {
      AccountTreeController,
      AccountsController,
      RemoteFeatureFlagController,
    } = Engine.context;

    const { enableMultichainAccounts } =
      RemoteFeatureFlagController.state.remoteFeatureFlags;
    if (!assertMultichainAccountsFeatureFlagType(enableMultichainAccounts)) {
      return;
    }
    const isMultichainAccountsEnabled =
      this.isMultichainAccountsEnabledForState1(enableMultichainAccounts);

    if (isMultichainAccountsEnabled) {
      await new Promise((resolve) => setTimeout(resolve, 5000));
      await AccountsController.updateAccounts();
      AccountTreeController.init();
    }
```
**Testing bug**
With multichainAccounts flag enabled. 
1. Add delay
2. Login 
3. Go to account list
4. See that the old account list is shown. 

**Testing the fix.**
With multichainAccounts flag enabled. 

1. Login 
2. Go to account list
3. See that wallet details is still shown. 

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->


https://github.com/user-attachments/assets/a9e9c803-48e5-4a1e-9cdd-c3faec6d990f



### **After**

Logging in does not take this long. A 5 second delay has been added. 


https://github.com/user-attachments/assets/f0085f32-d717-4df6-9f90-62ef17fe0b13




<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] 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).
- [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-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.
@pull pull Bot locked and limited conversation to collaborators Jul 30, 2025
@pull pull Bot added the ⤵️ pull label Jul 30, 2025
@pull pull Bot merged commit 17bfc76 into Reality2byte:main Jul 30, 2025
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants