refactor: migrate multichain account components to DS#30249
Conversation
| closeButtonOptions: { | ||
| variant: ButtonIconVariant.Icon, | ||
| iconName: ToastIconName.Close, | ||
| variant: 'Icon', |
There was a problem hiding this comment.
I see some ButtonIconVariant in the DS package, but none of them matches 'Icon', should we use ButtonIconVariant.Default instead?
There was a problem hiding this comment.
I don't think so because the interface expects the value Icon and ButtonIconVariant.Default is set to default. @MetaMask/design-system can you double check this?
@ccharly lets wait for the team to chime in and lets not block the PR
| (typeof AvatarAccountType)[keyof typeof AvatarAccountType]; | ||
|
|
||
| export const getAvatarAccountVariant = ( | ||
| avatarAccountType: AccountAvatarVariant, |
There was a problem hiding this comment.
Should this also use LegacyAvatarAccountType?
| avatarAccountType: AccountAvatarVariant, | |
| avatarAccountType: AccountAvatarVariant | LegacyAvatarAccountType, |
There was a problem hiding this comment.
AccountAvatarVariant already takes into account the legacy type:
export type AccountAvatarVariant =
| AvatarAccountVariant
| LegacyAvatarAccountType;|
|
||
| act(() => { | ||
| jest.advanceTimersByTime(400); | ||
| }); |
There was a problem hiding this comment.
Do we need this part? Is it to avoid an in-flight promise based on time (maybe animation)?
If yes, we could add a comment explaining that!
| interface AccountCellProps { | ||
| accountGroup: AccountGroupObject; | ||
| avatarAccountType: AvatarAccountType; | ||
| avatarAccountType: AccountAvatarVariant; |
There was a problem hiding this comment.
Nit: IDK if we want to align naming here too? Might not really be part of the DS migration initiative (I couldn't find a AvatarAccountType on the DS package, so "variant" seems to be the only term we use for this now)
There was a problem hiding this comment.
What are you suggesting specifically? Change the type name or the prop name?
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: The PR migrates MultichainAccounts component library components from the legacy internal design system to @metamask/design-system-react-native. Key changes include:
These components are used across critical flows:
The risk is medium because while the changes are UI-only (no business logic changes), the prop API changes could cause rendering failures or break E2E test selectors. The testID placement change in TextFieldSearch is particularly notable. SmokeSwap is included because Bridge RecipientSelectorModal directly uses MultichainAccountSelectorList. Performance Test Selection: |
|



Description
Migrates the MultichainAccounts temporary component internals away from deprecated component-library imports and onto
@metamask/design-system-react-nativeequivalents.This updates account rows, external account rows, account selector list pieces, address rows, checkboxes, search fields, text, icons, sensitive text, and avatar usage. It also adds a small avatar variant compatibility helper so legacy persisted selector values such as
Maskicon,JazzIcon, andBlockiescontinue to map to the DSAvatarAccountVariantAPI.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MUL-1693
Manual testing steps
Screenshots/Recordings
Screen.Recording.2026-05-15.at.4.13.43.PM.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Medium risk because it swaps core UI primitives (avatars, text, search, checkbox, toast) used across multichain account selection/address flows, which could introduce visual or interaction regressions despite largely being API-level refactors.
Overview
Migrates the temporary
MultichainAccountsUI components off deprecated component-library primitives and onto@metamask/design-system-react-nativeequivalents (e.g.,AvatarAccount/AvatarNetwork,Text/SensitiveText,Icon,Checkbox, andTextFieldSearch).Adds
avatarAccountVariantcompatibility helpers so persisted legacy avatar type strings (Maskicon/JazzIcon/Blockies) map cleanly to DSAvatarAccountVariant, and updates affected components/tests to use the new variant API and updated test IDs.Refactors
MultichainAddressRowto use DS toast/button/icon/network avatar APIs and adjusts tests to properly handle async copy feedback and timers.Reviewed by Cursor Bugbot for commit 168d775. Bugbot is set up for automated code reviews on this repo. Configure here.