Skip to content

Conversation

@montelaidev
Copy link
Contributor

@montelaidev montelaidev commented Apr 22, 2025

Description

This PR enables the discover Accounts call during import srp and creation of a new vault.

Changes:

  1. update multiSrp/index to call addDiscoveredAccounts and add tests.
  2. Updates SolanaNewFeatureContent.test.tsx to use the MultichainWalletSnapFactory
  3. Refactor name logic into a separate file getMultichainAccountName in AddNewAccount
  4. In Authentication addDiscoveredAccounts is called after createNewVaultandRestore and createNewVaultAndKeychain

Related issues

Fixes:

Manual testing steps

Using the beta build.

Onboarding flow

  1. With a new MM instance, create a new vault.
  2. See that there is a new solana account along with the ethereum account.

Import new srp during onboarding

  1. With a new MM instance, import a new srp
  2. See that there is a new solana account along with the ethereum account.

With an existing MM vault.

  1. Click on account selector.
  2. Click on Secrete Recovery Phrase
  3. Add a new srp.
  4. See that there is a new solana account created after the import.

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 88.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 67.85%. Comparing base (cf99fce) to head (0f88b78).

Files with missing lines Patch % Lines
app/core/SnapKeyring/MultichainWalletSnapClient.ts 77.77% 3 Missing and 1 partial ⚠️
...core/SnapKeyring/utils/getMultichainAccountName.ts 90.90% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14775      +/-   ##
==========================================
+ Coverage   67.81%   67.85%   +0.03%     
==========================================
  Files        2339     2340       +1     
  Lines       50384    50405      +21     
  Branches     7427     7431       +4     
==========================================
+ Hits        34168    34202      +34     
+ Misses      14052    14036      -16     
- Partials     2164     2167       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@montelaidev montelaidev enabled auto-merge April 30, 2025 05:55
@montelaidev montelaidev changed the title feat: create solana account and call discoverAccounts during creation and import of hd keyring feat: create solana account and call discoverAccounts during creation and import of hd keyring cp-7.46.0 Apr 30, 2025
@montelaidev montelaidev changed the title feat: create solana account and call discoverAccounts during creation and import of hd keyring cp-7.46.0 feat: create solana account and call discoverAccounts during creation and import of hd keyring cp-7.47.0 May 7, 2025
@montelaidev montelaidev requested a review from a team May 7, 2025 01:02
@montelaidev montelaidev force-pushed the feat/mmmultisrp-165 branch from 341417f to 3d1dc7b Compare May 7, 2025 01:03
@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 3d1dc7b
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/4e6bca89-94f5-4ac8-9da6-a044bc7b5cf5

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@montelaidev montelaidev changed the title feat: create solana account and call discoverAccounts during creation and import of hd keyring cp-7.47.0 feat: create solana account and call discoverAccounts during creation and import of hd keyring May 7, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 7, 2025

Copy link
Contributor

@owencraston owencraston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the import and with an existing MM vault flow and it worked as expected. The code also looks good to me.

screen-20250508-200436.2.mp4

@montelaidev montelaidev added this pull request to the merge queue May 8, 2025
Merged via the queue into main with commit 23e30d0 May 8, 2025
40 checks passed
@montelaidev montelaidev deleted the feat/mmmultisrp-165 branch May 8, 2025 19:29
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2025
@metamaskbot metamaskbot added the release-7.48.0 Issue or pull request that will be included in release 7.48.0 label May 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

QA Passed QA testing has been completed and passed release-7.48.0 Issue or pull request that will be included in release 7.48.0 team-accounts-framework Accounts Framework team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants