MetaMask / MetaMask/metamask-extension

[Bug]: Account Sync - `user-storage-api` response returns 15 accounts, but I'm seeing 10, with incorrect naming for the last one, which updated after adding HW accounts

Open
#27,444 0 comments 0 reactions 0 assignees View on GitHub
Sev2-normal team-notifications-deprecated type-bug
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### Describe the bug

After onboarding with an imported SRP, I see how the `https://user-storage.api.cx.metamask.io/api/v1/userstorage/accounts` returns 15 entries, but I am seeing only 10 in my wallet.
Additionally, the last account displays an incorrect number 11 (instead of 10). After that, when I added 2 trezor accounts, I saw that the Account 11 updated its value to 10

### Expected behavior

_No response_

### Screenshots/Recordings
Initial onboarding, without any action performed.
![Screenshot from 2024-09-27 09-16-22](https://github.com/user-attachments/assets/04d52d88-e0c3-4097-85f9-0697b6cc450a)

After adding 2 Trezor accounts, the last Account 11, updated to 10

![Screenshot from 2024-09-27 09-21-54](https://github.com/user-attachments/assets/ba760afd-f406-4e37-a042-885b4b4fb56f)

Uploading actt-sync.mp4…

### Steps to reproduce

This is happening to my SRP, so it's likely hard to repro with another one, but happy to debug in a call.
1. Perform onboarding with an SRP
2. Check account list
3. Check network response

### Error messages or log output

_No response_

### Detection stage

On the development branch

### Version

develop

### Build type

None

### Browser

Chrome

### Operating system

Linux

### Hardware wallet

_No response_

### Additional context

_No response_

### Severity

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing onboarding with an imported SRP, then compare the account list with the user-storage-api response at /api/v1/userstorage/accounts. Verify why 15 returned entries produce only 10 visible accounts and why the final account is numbered 11 before and after adding two Trezor accounts; the issue provides no named files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.