Skip to content

Conversation

@mathieuartu
Copy link
Contributor

@mathieuartu mathieuartu commented Nov 12, 2025

Description

Changelog

CHANGELOG entry: fix error message when trying to import an SRP with an account that is already imported via private key

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MUL-491

Manual testing steps

  1. Import private key account
  2. Import SRP that includes this private key account
  3. Verify that the error message "The account you are trying to import is a duplicate." is shown

Screenshots/Recordings

Before

After

image

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.

Note

Adds explicit handling and user-facing message when an SRP import fails due to a duplicate account, with tests and i18n updates.

  • Import SRP View (app/components/Views/ImportNewSecretRecoveryPhrase/index.tsx):
    • Refactor error handling to switch and add case for KeyringController - The account you are trying to import is a duplicate, showing error_duplicate_account alert.
  • Tests (app/components/Views/ImportNewSecretRecoveryPhrase/index.test.tsx):
    • Add test to assert duplicate account import error triggers the correct alert.
  • Localization (locales/languages/en.json):
    • Add import_new_secret_recovery_phrase.error_duplicate_account copy.

Written by Cursor Bugbot for commit f43d802. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-accounts-framework Accounts Framework team label Nov 12, 2025
@sonarqubecloud
Copy link

@mathieuartu mathieuartu added this pull request to the merge queue Nov 12, 2025
Merged via the queue into main with commit ed55b41 Nov 12, 2025
108 checks passed
@mathieuartu mathieuartu deleted the fix/private-key-srp-import-duplicate-error-message branch November 12, 2025 15:03
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2025
@metamaskbot metamaskbot added the release-7.60.0 Issue or pull request that will be included in release 7.60.0 label Nov 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.60.0 Issue or pull request that will be included in release 7.60.0 size-S team-accounts team-accounts-framework Accounts Framework team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants