Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { parseCaipChainId } from '@metamask/utils';
import { toHex } from '@metamask/controller-utils';
import { useSelector } from 'react-redux';
import { formatChainIdToCaip } from '@metamask/bridge-controller';
import { useTailwind } from '@metamask/design-system-twrnc-preset';

// external dependencies
import { strings } from '../../../../locales/i18n';
Expand Down Expand Up @@ -42,7 +41,6 @@ import { useNetworksToUse } from '../../hooks/useNetworksToUse/useNetworksToUse'
import AccountGroupBalancePerChain from '../Assets/components/Balance/AccountGroupBalancePerChain';
// internal dependencies
import createStyles from './CustomNetworkSelector.styles';
import { useElevatedSurface } from '../../../util/theme/themeUtils';

import {
CustomNetworkItem,
Expand All @@ -64,8 +62,6 @@ const CustomNetworkSelector = ({
}: CustomNetworkSelectorProps) => {
const { colors } = useTheme();
const { styles } = useStyles(createStyles, {});
const tw = useTailwind();
const surfaceClass = useElevatedSurface();
const { navigate } = useNavigation();
const safeAreaInsets = useSafeAreaInsets();

Expand Down Expand Up @@ -168,7 +164,6 @@ const CustomNetworkSelector = ({
caipChainId,
isSelected,
)}
style={tw.style(surfaceClass)}
>
{(!isTestNet(chainId) || showFiatOnTestnets) && (
<AccountGroupBalancePerChain caipChainId={caipChainId} />
Expand All @@ -185,8 +180,6 @@ const CustomNetworkSelector = ({
createAvatarProps,
selectedChainIdCaip,
showFiatOnTestnets,
surfaceClass,
tw,
],
);

Expand Down
3 changes: 0 additions & 3 deletions app/components/UI/FundActionMenu/FundActionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ import type {
} from './FundActionMenu.types';
import { getDetectedGeolocation } from '../../../reducers/fiatOrders';
import { useRampsButtonClickData } from '../Ramp/hooks/useRampsButtonClickData';
import { useElevatedSurface } from '../../../util/theme/themeUtils';

const FundActionMenu = () => {
const sheetRef = useRef<BottomSheetRef>(null);
const navigation = useNavigation();
const surfaceClass = useElevatedSurface();
const route = useRoute<FundActionMenuRouteProp>();

const customOnBuy = route.params?.onBuy;
Expand Down Expand Up @@ -170,7 +168,6 @@ const FundActionMenu = () => {
ref={sheetRef}
goBack={navigation.goBack}
testID="fund-action-menu-bottom-sheet"
twClassName={surfaceClass}
>
<Box twClassName="py-4">
{actionConfigs.map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ import { strings } from '../../../../locales/i18n';
import TagColored, {
TagColor,
} from '../../../component-library/components-temp/TagColored';
import { useElevatedSurface } from '../../../util/theme/themeUtils';

const SELECTION_DEBOUNCE_DELAY = 150;

Expand Down Expand Up @@ -117,7 +116,6 @@ const NetworkMultiSelectList = ({

const { styles } = useStyles(styleSheet, {});
const tw = useTailwind();
const surfaceClass = useElevatedSurface();

const processedNetworks = useMemo(
(): ProcessedNetwork[] =>
Expand Down Expand Up @@ -331,7 +329,7 @@ const NetworkMultiSelectList = ({
disabled={isDisabled}
showButtonIcon={showButtonIcon}
buttonProps={createButtonProps(network)}
style={tw.style(`${surfaceClass} items-center`)}
style={tw.style('items-center')}
testID={NETWORK_MULTI_SELECTOR_TEST_IDS.NETWORK_LIST_ITEM(
caipChainId,
isSelected,
Expand Down Expand Up @@ -361,7 +359,6 @@ const NetworkMultiSelectList = ({
isGasFeesSponsoredNetworkEnabled,
isHardwareWallet,
styles.noNetworkFeeContainer,
surfaceClass,
tw,
styles.networkNameText,
],
Expand Down
9 changes: 1 addition & 8 deletions app/components/Views/AddressSelector/AddressSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import { createAccountSelectorNavDetails } from '../AccountSelector';
import { NetworkConfiguration } from '@metamask/network-controller';
import { strings } from '../../../../locales/i18n';
import { AddressSelectorSelectors } from './AddressSelector.testIds';
import { useElevatedSurface } from '../../../util/theme/themeUtils';

export const createAddressSelectorNavDetails =
createNavigationDetails<AddressSelectorParams>(
Expand Down Expand Up @@ -73,7 +72,6 @@ const AddressSelector = () => {
);

const accountName = useAccountName();
const surfaceClass = useElevatedSurface();
const selectedCaipChainId = isCaipChainId(selectedChainId)
? selectedChainId
: toEvmCaipChainId(selectedChainId);
Expand Down Expand Up @@ -153,12 +151,7 @@ const AddressSelector = () => {
}, [internalAccountsSpreadByScopes, isEvmOnly, displayOnlyCaipChainIds]);

return (
<BottomSheet
ref={sheetRef}
isFullscreen
goBack={navigation.goBack}
twClassName={surfaceClass}
>
<BottomSheet ref={sheetRef} isFullscreen goBack={navigation.goBack}>
<BottomSheetHeader onClose={() => sheetRef.current?.onCloseBottomSheet()}>
{strings('address_selector.select_an_address')}
</BottomSheetHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
import { strings } from '../../../../../locales/i18n';

import { NetworksManagementViewSelectorsIDs } from '../NetworksManagementView.testIds';
import { useElevatedSurface } from '../../../../util/theme/themeUtils';

interface DeleteNetworkModalProps {
networkName: string;
Expand All @@ -38,15 +37,12 @@ const DeleteNetworkModal = forwardRef<BottomSheetRef, DeleteNetworkModalProps>(
testID: NetworksManagementViewSelectorsIDs.DELETE_CONFIRM_BUTTON,
};

const surfaceClass = useElevatedSurface();

return (
<BottomSheet
ref={ref}
onClose={onClose}
goBack={onClose}
testID={NetworksManagementViewSelectorsIDs.DELETE_MODAL}
twClassName={surfaceClass}
>
<BottomSheetHeader onClose={onClose}>
{`${strings('app_settings.delete')} ${networkName} ${strings('app_settings.network')}`}
Expand Down
Loading