Skip to content

Conversation

@mikesposito
Copy link
Member

@mikesposito mikesposito commented Apr 25, 2025

Description

Bumping @metamask/keyring-controller to ^21.0.4

## [21.0.4]

### Fixed

- Ensure no duplicate accounts are persisted ([#5710](https://github.com/MetaMask/core/pull/5710))

Open in GitHub Codespaces

Related issues

Fixes: #32097

Manual testing steps

In order to test the fix, you first need a wallet bricked because of a duplicate account:

  • Checkout on the v12.16.0 release branch and build locally (a version with multi-srp support)
  • Import or create an SRP (I used child guilt hollow arrive average popular nasty soon summer like scheme diary pill country rapid)
  • Import an account that is part of the mnemonic (e.g. I used 0x80842b7e3cfb1118e86a427cdec418e3b4179ef5bbbfd71c02a76349831c8a8b which is the account at index 2 of the above SRP)
  • Add a new account on the main HD - note that you'll be able to add the account, but (1) the account is the same as the imported one (expectable) and (2) the newly added account is wrongly labeled as "imported"
  • Lock the wallet
  • Unlock it with the right password - you will see the reported error:
Error: KeyringController - The account you are trying to import is a duplicate
await in withLock		
submitPassword	@	metamask-controller.js:4343
await in submitPassword		
(anonymous)	@	createMetaRPCHandler.js:23

Testing the fix

  • Without removing the extension from the browser, switch to this PR branch and build again
  • Visit chrome://extensions/ and reload the extension
  • Try to login again, you should be able to access the wallet again

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.

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​keyring-controller@​21.0.3 ⏵ 21.0.4941007698 +1100

View full report

@mikesposito mikesposito self-assigned this Apr 25, 2025
@mikesposito mikesposito changed the title fix: bump @metamask/keyring-controller from ^21.0.3 to ^21.0.4 fix: cp-12.17.0 bump @metamask/keyring-controller from ^21.0.3 to ^21.0.4 Apr 25, 2025
Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

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

LGTM!

@mikesposito mikesposito enabled auto-merge April 25, 2025 12:50
@mikesposito mikesposito added this pull request to the merge queue Apr 25, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [e0afbb2]
UI Startup Metrics (1181 ± 51 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1181107712935112211272
load102293511334510471103
domContentLoaded101793011254410421097
domInteractive17133151628
firstPaint66775113240710301086
backgroundConnect6317279
firstReactRender20154952032
getState1243571825
initialActions001001
loadScripts78470489142816859
setupStore85182813
WebpackHomeuiStartup21481723256615922592394
load16661358202512117491874
domContentLoaded16591354201412017401865
domInteractive171176121344
firstPaint1928160883235319
backgroundConnect2810247262963
firstReactRender21454378119319363
getState1244071528
initialActions512712735
loadScripts16511353199112117361858
setupStore1766282030
FirefoxBrowserifyHomeuiStartup1381119316529314441569
load12231017147210012921409
domContentLoaded12231017147110012921409
domInteractive1083824033120170
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2214106132047
firstReactRender23195652434
getState74232810
initialActions001001
loadScripts1204991144910012701389
setupStore9417618712
WebpackHomeuiStartup14931341179811715681743
load1281116015459813431500
domContentLoaded1280116015449813431500
domInteractive84552672994135
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2415116162344
firstReactRender35295053644
getState83324912
initialActions102111
loadScripts1258114115239613151481
setupStore95598826
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: -102 Bytes (0%)

Merged via the queue into main with commit e887cc7 Apr 25, 2025
181 of 183 checks passed
@mikesposito mikesposito deleted the mikesposito/fix/duplicate-accounts branch April 25, 2025 13:35
@github-actions github-actions bot locked and limited conversation to collaborators Apr 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]Error: "KeyringController - keyring metadata length mismatch" - during login after using the correct password.

5 participants