fix: don't prevent users from removing account that are from account snap accounts#40404
fix: don't prevent users from removing account that are from account snap accounts#40404
Conversation
✨ Files requiring CODEOWNER review ✨🔑 @MetaMask/accounts-engineers (2 files, +1 -13)
|
5354a2a to
8ae89fc
Compare
Builds ready [8ae89fc]
⚡ Performance Benchmarks (1432 ± 106 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
...ages/multichain-accounts/multichain-account-details-page/multichain-account-details-page.tsx
Outdated
Show resolved
Hide resolved
Builds ready [acd318c]
⚡ Performance Benchmarks (1394 ± 99 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
|
Builds ready [ce49af3]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| it('does not render remove account section for Snap wallet type', () => { | ||
| mockUseParams.mockReturnValue({ | ||
| id: 'snap:local:snap-id/0xb552685e3d2790efd64a175b00d51f02cdafee5d', | ||
| }); | ||
|
|
||
| renderComponent(); | ||
|
|
||
| expect(screen.queryByText(/remove account/iu)).not.toBeInTheDocument(); | ||
| }); |
There was a problem hiding this comment.
The caveat here is that is should only be true for 3rd party snap. I think this is ok now that we have multichain accounts
There was a problem hiding this comment.
Yes, it is because e.g. solana accounts don't get the snap wallet type, they don't join entropy account groups. Minor correction though, it's not for third party snaps, but for "account snaps that do not join entropy account groups" - which includes third party snaps but also the institutional one
There was a problem hiding this comment.
The 1st vs 3rd party snap rule for deletion was decided before multichain accounts and institutional snaps. We have to update it now with the new standards



Description
Institutional snap users need to be able to remove the accounts, so that they can (for example) update their tokens
Changelog
CHANGELOG entry: Allow users to remove snap accounts if they are from a snap account wallet
Related issues
N/A
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Expands when account removal UI is exposed; incorrect wallet-type detection could allow unintended removals or confuse users, though the change is small and localized.
Overview
Allows the Remove account section to appear for Snap wallet types by changing the removability check in
MultichainAccountDetailsPageto only block Entropy wallets.Updates the page test suite by removing the expectation that Snap wallets cannot be removed, keeping coverage for Entropy (not removable) and Keyring (removable).
Written by Cursor Bugbot for commit ce49af3. This will update automatically on new commits. Configure here.