refactor: migrate BaseAccountDetails and SmartAccountModal#29766
Conversation
…n system (MUL-1689) Migrate AccountInfo, ExportCredentials, SmartAccount, and SmartAccountNetworkList from component-library to @metamask/design-system-react-native. Update SmartAccount unit test Icon import. Part 1 of 2 for MUL-1689. Co-authored-by: Cursor <cursoragent@cursor.com>
…l (MUL-1689) Migrate BaseAccountDetails and SmartAccountModal to design-system HeaderBase, AvatarAccount, Text, and Icon. Align tests with design-system Header title test id and narrower AvatarAccountType imports. Part 2 of 2 for MUL-1689; stack on gar/refactor/mul-1689/part-1. Co-authored-by: Cursor <cursoragent@cursor.com>
Import Skeleton from components-temp so Jest/E2E disable animations per PR #29765 review (Cursor Bugbot). Co-authored-by: Cursor <cursoragent@cursor.com>
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
SmokeAccounts is selected because:
SmokeWalletPlatform is selected because:
The changes are purely cosmetic/refactoring with no business logic changes, but the HeaderBase API change could affect how the back button renders and is interacted with in E2E tests. Risk is medium because the testIDs are preserved but the underlying component structure changed. Performance Test Selection: |
|



Description
Part 2 of 2 for MUL-1689. Base branch:
gar/refactor/mul-1689/part-1(merge part 1 first, or rebase this branch ontomainafter part 1 lands and retarget tomain).Migrates the Account Details shell and related tests from
app/component-libraryto@metamask/design-system-react-native:BaseAccountDetails/index.tsx— design-systemHeaderBase(titleTestIDfor title queries),startButtonIconPropsfor back,AvatarAccountwith mapping from settingsAvatarAccountTypetoAvatarAccountVariant,Text/Iconwith semantic tokens.BaseAccountDetails/styles.ts— remove obsolete text color style now covered byTextColor.SmartAccountModal.tsx— design-systemHeaderBase,Text, nested learn-moreTextwithTextColor.InfoDefault.AvatarAccountTypeimport path;HardwareAccountDetailsheader title assertion uses the sameheader-titletest id as design-systemHeaderBase.Depends on part 1 for a consistent Account Details tree.
Changelog
CHANGELOG entry: null
Related issues
Refs: https://consensyssoftware.atlassian.net/browse/MUL-1689
Manual testing steps
Screenshots/Recordings
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
Low Risk
UI-only component swap with preserved navigation, test IDs, and avatar mapping; no auth or credential logic changes in this diff.
Overview
Migrates the multichain Account Details shell (
BaseAccountDetails) and Smart Account modal fromapp/component-libraryto@metamask/design-system-react-native, keeping behavior and test IDs aligned with the previous UI.BaseAccountDetailsnow uses design-systemHeaderBasewithtitleTestIDheader-titleandstartButtonIconPropsfor back (replacingButtonLink+Icon),AvatarAccountwith atoAvatarAccountVariantbridge from settingsAvatarAccountType, andText/IconwithTextVariant,FontWeight,TextColor, andIconColorinstead of theme-driven styles. Row styling drops the localtextcolor rule in favor of tokens.SmartAccountModalfollows the same header pattern and updates body copy to design-systemText, including learn-more styling viaTextColor.InfoDefault.Related unit tests import
AvatarAccountTypefrom the narrower path and assert the header title viaheader-titlewhere the legacyHEADERBASE_TITLE_TEST_IDconstant was removed.Reviewed by Cursor Bugbot for commit 92afdd3. Bugbot is set up for automated code reviews on this repo. Configure here.