Skip to content

fix: Prevent HD keyring from being removed#24106

Merged
danjm merged 1 commit intoVersion-v11.15.0from
cherry-pick-keyring-patch-for-v11.15.0
Apr 18, 2024
Merged

fix: Prevent HD keyring from being removed#24106
danjm merged 1 commit intoVersion-v11.15.0from
cherry-pick-keyring-patch-for-v11.15.0

Conversation

@Gudahtt
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt commented Apr 18, 2024

Description

Cherry-pick of #24096 for v11.15.0

Related issues

See linked PR

Manual testing steps

  • Create/import a wallet
  • Lock the wallet
  • Unlock the wallet
  • Add a private key
  • Create a new HD account
  • Lock the wallet
  • Unlock the wallet
  • Connect a hardware wallet and add accounts
  • Lock the wallet
  • Unlock the wallet

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.

## **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
MetaMask/mobile-planning#1507 for additional
details.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/24096?quickstart=1)

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

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.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-extension/blob/develop/.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.
@Gudahtt Gudahtt changed the title fix: Prevent HD keyring from being removed (#24096) fix: Prevent HD keyring from being removed Apr 18, 2024
@Gudahtt Gudahtt marked this pull request as ready for review April 18, 2024 12:50
@Gudahtt Gudahtt requested a review from a team as a code owner April 18, 2024 12:50
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [2edc4cc]
Page Load Metrics (463 ± 366 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint672701104622
domContentLoaded108327199
load542058463762366
domInteractive108327199
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 141 Bytes (0.00%)
  • ui: 86 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@danjm danjm merged commit 3b24df8 into Version-v11.15.0 Apr 18, 2024
@danjm danjm deleted the cherry-pick-keyring-patch-for-v11.15.0 branch April 18, 2024 13:27
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
@metamaskbot metamaskbot added the release-11.15.0 Issue or pull request that will be included in release 11.15.0 label Apr 18, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

No release label on PR. Adding release label release-11.15.0 on PR, as PR was cherry-picked in branch 11.15.0.

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

Labels

release-11.15.0 Issue or pull request that will be included in release 11.15.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants