MetaMask / MetaMask/metamask-extension

[Bug]: Permissions - Removing Hardware wallet accounts doesn't clear up Permission site entry

Open
#43,618 3 comments 0 reactions 0 assignees View on GitHub
INVALID-ISSUE-TEMPLATE regression-RC-13.36.0 Sev2-normal team-core-platform type-bug
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

**Describe the bug**

Removing a Hardware wallet account doesn't clear up Permission site entry, if the account was connected to a dapp.
The permissions Sites page still shows the dapp which the hardware wallet was connected to, but now it displays 0 accounts.

**Expected behavior**

We should remove the sites entry as no accounts are connected

**Screenshots/Recordings**

https://github.com/user-attachments/assets/b8c8e1db-4cd4-4d49-8365-9da772a1a2a0

**Steps to reproduce**

1. Go to Add Accounts
2. Add a Ledger account
3. Go to the test dapp
4. Connect with the Ledger Account (no other account)
5. Now click Accounts
6. Add Hardware Wallet
7. Select Ledger
8. Click Forget device
9. See Ledger account has been removed
10. Click Menu > Dapp Permissions --> see test dapp appears as an entry but it shows 0 accounts connected, with the list of networks

**Error messages or log output**

```shell

```

**Where was this bug found?**

Internal release testing

**Version**

13.36.0

**Build type**

None

**Browser**

Chrome

**Operating system**

MacOS

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the listed Ledger-account removal flow, then inspect the Dapp Permissions page and the account-removal flow. Done means removing the hardware wallet also removes any site entry with zero connected accounts, while sites with remaining accounts continue to display normally.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authorization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.