-
Notifications
You must be signed in to change notification settings - Fork 5.2k
fix: discard duplicate accounts on unlock #32621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Caution Review the following alerts detected in dependencies. According to your organization's Security Policy, you must resolve all "Block" alerts before proceeding. Learn more about Socket for GitHub.
|
✨ Files requiring CODEOWNER review ✨🧩 @MetaMask/extension-devs
📜 @MetaMask/policy-reviewers
🔗 @MetaMask/supply-chain
🖥️ @MetaMask/wallet-ux
|
Builds ready [a12ebda]
UI Startup Metrics (1231 ± 67 ms)
Benchmark value 1068 exceeds gate value 1061 for chrome browserify home mean domContentLoaded Benchmark value 339 exceeds gate value 334 for chrome webpack home p95 firstPaint Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore Benchmark value 1664 exceeds gate value 1660 for firefox webpack home p95 load Benchmark value 1664 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded Benchmark value 1641 exceeds gate value 1630 for firefox webpack home p95 loadScripts Sum of mean exceeds: 13ms | Sum of p95 exceeds: 24ms Sum of all benchmark exceeds: 37ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
@metamask/keyring-controller
Builds ready [7a8160e]
UI Startup Metrics (1196 ± 56 ms)
Benchmark value 175 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState Benchmark value 15 exceeds gate value 13 for firefox webpack home mean setupStore Sum of mean exceeds: 3ms | Sum of p95 exceeds: 115ms Sum of all benchmark exceeds: 118ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [ca12a89]
UI Startup Metrics (1208 ± 69 ms)
Benchmark value 1420 exceeds gate value 1405 for firefox browserify home mean uiStartup Benchmark value 1255 exceeds gate value 1245 for firefox browserify home mean load Benchmark value 1255 exceeds gate value 1239 for firefox browserify home mean domContentLoaded Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender Benchmark value 15 exceeds gate value 11 for firefox browserify home mean getState Benchmark value 1234 exceeds gate value 1230 for firefox browserify home mean loadScripts Benchmark value 1669 exceeds gate value 1660 for firefox browserify home p95 uiStartup Benchmark value 31 exceeds gate value 24 for firefox browserify home p95 getState Sum of mean exceeds: 50ms | Sum of p95 exceeds: 20ms Sum of all benchmark exceeds: 70ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Dependent on:
Updating
@metamask/keyring-controller
with these fixes:Related issues
Fixes:
Manual testing steps
1. Add duplicate to the wallet state
1.1. Switch to the
v11.7.3
branch, build locally, and install the extension fromchrome://extensions
1.2. Onboard with an SRP of which we know the second account (
child guilt hollow arrive average popular nasty soon summer like scheme diary pill country rapid
)1.3. Import an account that is part of the mnemonic (
0x80842b7e3cfb1118e86a427cdec418e3b4179ef5bbbfd71c02a76349831c8a8b
which is the account at index 2 of the above SRP)1.4. Add a new account on the main HD
1.5. Switch to
Version-v12.17.1
branch, and refresh the extension inchrome://extensions
1.6. Unlock the wallet, you should see duplicates in your accounts list and you won't be able to add new accounts
2. Test the fix
2.1. Switch to this branch, build locally, and refresh the extension in
chrome://extensions
2.2 Unlock the wallet, you shouldn't see duplicate accounts anymore, and you should be able to add new accounts
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist