Skip to content

fix: Prevent HD keyring from being removed#24096

Merged
Gudahtt merged 1 commit intodevelopfrom
ensure-hd-keyring-cannot-be-removed
Apr 18, 2024
Merged

fix: Prevent HD keyring from being removed#24096
Gudahtt merged 1 commit intodevelopfrom
ensure-hd-keyring-cannot-be-removed

Conversation

@Gudahtt
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt commented Apr 17, 2024

Description

A patch has been added for the @metamask/keyring-controller package that will prevent the HD keyring from being removed. This is a precautionary change, see https://github.com/MetaMask/mobile-planning/issues/1507 for additional details.

Open in GitHub Codespaces

Related issues

This is a port of this PR: MetaMask/core#4168
Here is the same patch on mobile: MetaMask/metamask-mobile#9092

Manual testing steps

This is a precaution against a bug that probably does not exist. We don't have reproduction steps.

However, here are some use cases related to this area of code, which we can test to ensure nothing has broken:

  • Lock and unlock the wallet
  • Restart the extension then unlock it again
  • Add a new account, lock the wallet, restart the extension, then check to ensure the new account is still present.

Screenshots/Recordings

N/A

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • 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 format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). 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.

@Gudahtt Gudahtt force-pushed the ensure-hd-keyring-cannot-be-removed branch from e00e857 to 4690d85 Compare April 17, 2024 23:26
@Gudahtt Gudahtt added the team-extension-platform Extension Platform team label Apr 17, 2024
@Gudahtt Gudahtt force-pushed the ensure-hd-keyring-cannot-be-removed branch 3 times, most recently from 794837d to d21b012 Compare April 18, 2024 00:01
@Gudahtt Gudahtt requested review from danjm and gantunesr April 18, 2024 00:01
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.60%. Comparing base (0b2b202) to head (6c83239).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #24096   +/-   ##
========================================
  Coverage    67.60%   67.60%           
========================================
  Files         1252     1252           
  Lines        49010    49010           
  Branches     12790    12790           
========================================
  Hits         33130    33130           
  Misses       15880    15880           

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

@Gudahtt Gudahtt marked this pull request as ready for review April 18, 2024 00:19
@Gudahtt Gudahtt requested a review from a team as a code owner April 18, 2024 00:19
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [d21b012]
Page Load Metrics (1122 ± 613 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7039217111153
domContentLoaded1075352010
load56301111221277613
domInteractive1075352010
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 141 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

A patch has been added for the `@metamask/keyring-controller` package
that will prevent the HD keyring from being removed. This is a
precautionary change, see MetaMask/mobile-planning#1507
for additional details.

This is a port of this PR: MetaMask/core#4168
Here is the same patch on mobile: MetaMask/metamask-mobile#9092
@Gudahtt Gudahtt force-pushed the ensure-hd-keyring-cannot-be-removed branch from d21b012 to 6c83239 Compare April 18, 2024 11:53
@Gudahtt Gudahtt merged commit e6428f8 into develop Apr 18, 2024
@Gudahtt Gudahtt deleted the ensure-hd-keyring-cannot-be-removed branch April 18, 2024 12:14
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
@metamaskbot metamaskbot added the release-11.16.0 Issue or pull request that will be included in release 11.16.0 label Apr 18, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [6c83239]
Page Load Metrics (1989 ± 673 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint663671668239
domContentLoaded989352311
load62369419891401673
domInteractive989352311
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 141 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

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

Labels

release-11.16.0 Issue or pull request that will be included in release 11.16.0 team-extension-platform Extension Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants