Skip to content

Conversation

@gantunesr
Copy link
Member

@gantunesr gantunesr commented Jan 7, 2026

Description

This PR removes code related to the legacy "Reveal Private Key" feature. This feature was deprecated with the release of BIP-44 and the implementation of a new "Reveal Private Key" flow.

Changelog

CHANGELOG entry: null

Related issues

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

Manual testing steps

Feature: remove legacy "Reveal Private Key"

  Scenario: user reveal private key for multichain account
    Given the new reveal private key flow

    When user selects the option "Private Key" in the Account Details menu
    Then a list of hidden private keys should be displayed for the user to copy

Screenshots/Recordings

Not applicable, no changes to the UI/UX

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

Removes the legacy "Reveal Private Key" flow and consolidates credential reveal around SRP only.

  • Routes "Show private key" from account actions to Routes.SHEET.MULTICHAIN_ACCOUNT_DETAILS.REVEAL_PRIVATE_CREDENTIAL with { account } params; drops old settings route/params
  • Refactors RevealPrivateCredential to SRP-only: removes private-key paths, copy, analytics, and UI; adds SRP warning test id and updates modal/tab actions accordingly
  • Deletes Settings > Security "Reveal Private Key" section, styles, tests, and e2e page; updates SecuritySettings snapshots and selectors
  • Simplifies Multichain RevealPrivateKey sheet (header only) and removes its tests
  • Cleans up related tests across AccountActions, SRP quiz, and reveal flows; updates e2e specs to remove private key export

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

@metamaskbot metamaskbot added the team-accounts-framework Accounts Framework team label Jan 7, 2026
@gantunesr gantunesr added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Jan 8, 2026
@github-actions github-actions bot added size-XL and removed size-L labels Jan 8, 2026
@gantunesr gantunesr force-pushed the refactor/remove-private-key-reveal branch from c94f175 to d286067 Compare January 8, 2026 17:46
@github-actions github-actions bot added size-M and removed size-XL labels Jan 8, 2026
@github-actions github-actions bot added size-L and removed size-M labels Jan 8, 2026
@github-actions github-actions bot added size-XL and removed size-L labels Jan 9, 2026
@gantunesr gantunesr self-assigned this Jan 9, 2026
@gantunesr gantunesr marked this pull request as ready for review January 9, 2026 12:34
@gantunesr gantunesr requested review from a team as code owners January 9, 2026 12:34
@gantunesr gantunesr requested a review from a team as a code owner January 9, 2026 12:34
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeWalletPlatform
  • Risk Level: medium
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

This PR makes significant changes to the private key and SRP reveal functionality:

  1. RevealPrivateCredential component refactored: The component now only handles SRP reveal, removing all private key reveal logic. This is a substantial change to a security-sensitive component.

  2. Security Settings changes: The "Show private key" section is completely removed from Security & Privacy settings, changing the user flow for accessing private keys.

  3. Navigation route changes: AccountActions now navigates to a new multichain route for private key reveal instead of the old settings route.

  4. E2E test changes: The export-credentials.spec.ts test was modified to remove private key export testing, and RevealPrivateKeyView.ts page object was deleted.

  5. Multichain RevealPrivateKey sheet: The sheet content is now essentially empty (just a header), suggesting the private key reveal flow is being moved elsewhere.

The changes affect:

  • Account credential export flows (SRP and private key)
  • Security settings UI
  • Multichain accounts functionality

Selected tags:

  • SmokeAccounts: Covers account management tests including reveal-secret-recovery-phrase.spec.ts which tests SRP reveal from settings
  • SmokeWalletPlatform: Covers multichain accounts tests including export-credentials.spec.ts, export-srp-from-account-actions.spec.ts, and delete-account.spec.ts

Risk is medium because while these are security-sensitive changes, they appear to be a refactoring/removal of functionality rather than introducing new security-critical code paths. The unit tests have been updated comprehensively.

View GitHub Actions results

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 9, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-XL team-accounts-framework Accounts Framework team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants