Skip to content

Commit 27cb370

Browse files
fix(TMCU-1048): Remove redundant useElevatedSurface from MMDS BottomSheet callsites (#33159)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## **Description** MMDS `BottomSheet` now handles pure-black elevated surface styling internally. This PR removes the redundant `useElevatedSurface()` shim and `twClassName` prop from the two remaining accounts-engineer callsites scoped in TMCU-1048. **Changes:** - `ConfirmTurnOnBackupAndSyncModal` — removed `useElevatedSurface` import/usage and `twClassName` on `BottomSheet` - `LearnMoreBottomSheet` — removed `useElevatedSurface` import/usage and `twClassName` on `BottomSheet` ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: TMCU-1048 ## **Manual testing steps** ```gherkin Feature: Pure black elevated surface on MMDS BottomSheet Scenario: Backup and sync confirm sheet renders with correct surface Given the app is in dark mode with pure black preview enabled When the user opens the backup and sync confirmation bottom sheet Then the bottom sheet surface should use the elevated background (not collapse into pure black) Scenario: Multichain intro learn-more sheet renders with correct surface Given the app is in dark mode with pure black preview enabled When the user opens the multichain accounts learn-more bottom sheet Then the bottom sheet surface should use the elevated background (not collapse into pure black) ``` N/A for automated cloud-agent environment — visual QA requires device/simulator with pure black preview enabled. ## **Screenshots/Recordings** N/A — visual surface change only; requires device QA with pure black preview enabled per acceptance criteria. ### **Before** N/A ### **After** Backup and Sync BottomSheet background color still works as expected <img width="403" height="374" alt="Screenshot 2026-07-13 at 11 25 33 AM" src="https://github.com/user-attachments/assets/6b74972e-712c-43b1-a2a9-1d9bdf32782a" /> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. #### Performance checks (if applicable) - [ ] I've tested on Android - Ideally on a mid-range device; emulator is acceptable - [ ] I've tested with a power user scenario - Use these [power-user SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93) to import wallets with many accounts and tokens - [ ] I've instrumented key operations with Sentry traces for production performance metrics - See [`trace()`](/app/util/trace.ts) for usage and [`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274) for an example ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-162f7e2d-b583-4006-8d0c-5e899ef8902f"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/background-agent?bcId=bc-162f7e2d-b583-4006-8d0c-5e899ef8902f"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
1 parent 7719fa3 commit 27cb370

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

app/components/UI/Identity/ConfirmTurnOnBackupAndSyncModal/ConfirmTurnOnBackupAndSyncModal.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@ import { ConfirmTurnOnBackupAndSyncModalNavigateParams } from '../BackupAndSyncT
1515
import { InteractionManager } from 'react-native';
1616
import useThunkDispatch from '../../../hooks/useThunkDispatch';
1717

18-
import { useElevatedSurface } from '../../../../util/theme/themeUtils';
19-
2018
const ConfirmTurnOnBackupAndSyncModal = () => {
2119
const bottomSheetRef = useRef<BottomSheetRef>(null);
2220
const { enableBackupAndSync, trackEnableBackupAndSyncEvent } =
2321
useParams<ConfirmTurnOnBackupAndSyncModalNavigateParams>();
2422

2523
const dispatch = useThunkDispatch();
26-
const surfaceClass = useElevatedSurface();
2724

2825
const enableBasicFunctionality = async () => {
2926
await dispatch(toggleBasicFunctionality(true));
@@ -54,7 +51,7 @@ const ConfirmTurnOnBackupAndSyncModal = () => {
5451
};
5552

5653
return (
57-
<BottomSheet ref={bottomSheetRef} twClassName={surfaceClass}>
54+
<BottomSheet ref={bottomSheetRef}>
5855
<ModalContent
5956
title={turnContent.bottomSheetTitle}
6057
message={turnContent.bottomSheetMessage}

app/components/Views/MultichainAccounts/IntroModal/LearnMoreBottomSheet.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { RootState } from '../../../../reducers';
2222
import { useDispatch, useSelector } from 'react-redux';
2323
import { setMultichainAccountsIntroModalSeen } from '../../../../actions/user';
2424
import { LEARN_MORE_BOTTOM_SHEET_TEST_IDS } from './LearnMoreBottomSheet.testIds';
25-
import { useElevatedSurface } from '../../../../util/theme/themeUtils';
2625

2726
interface LearnMoreBottomSheetProps {
2827
onClose?: () => void;
@@ -40,7 +39,6 @@ const LearnMoreBottomSheet: React.FC<LearnMoreBottomSheetProps> = ({
4039
const isBasicFunctionalityEnabled = useSelector(
4140
(state: RootState) => state?.settings?.basicFunctionalityEnabled,
4241
);
43-
const surfaceClass = useElevatedSurface();
4442

4543
const handleBack = useCallback(() => {
4644
sheetRef.current?.onCloseBottomSheet();
@@ -68,7 +66,6 @@ const LearnMoreBottomSheet: React.FC<LearnMoreBottomSheetProps> = ({
6866
ref={sheetRef}
6967
onClose={onClose}
7068
testID={LEARN_MORE_BOTTOM_SHEET_TEST_IDS.BOTTOM_SHEET}
71-
twClassName={surfaceClass}
7269
>
7370
<View style={styles.container}>
7471
<View style={styles.header}>

0 commit comments

Comments
 (0)