File tree Expand file tree Collapse file tree
app/components/UI/Bridge/components
BatchSellDestinationTokenSelectorModal
BatchSellFinalReviewModal
BatchSellMinimumReceivedInfoModal
BatchSellNetworkFeeInfoModal
BatchSellQuoteDetailsModal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ import { RootState } from '../../../../../reducers';
3636import { BridgeToken } from '../../types' ;
3737import { formatTokenBalance } from '../../utils' ;
3838import { BatchSellDestinationTokenSelectorModalSelectorsIDs } from './BatchSellDestinationTokenSelectorModal.testIds' ;
39- import { useElevatedSurface } from '../../../../../util/theme/themeUtils' ;
4039
4140const getTokenKey = ( token : BridgeToken ) => `${ token . chainId } :${ token . address } ` ;
4241
@@ -87,7 +86,6 @@ export function BatchSellDestinationTokenSelectorModal() {
8786 chainIds :
8887 destinationChainIds ?? ( sourceChainId ? [ sourceChainId ] : undefined ) ,
8988 } ) ;
90- const surfaceClass = useElevatedSurface ( ) ;
9189
9290 const handleClose = useCallback ( ( ) => {
9391 sheetRef . current ?. onCloseBottomSheet ( ) ;
@@ -106,7 +104,6 @@ export function BatchSellDestinationTokenSelectorModal() {
106104 ref = { sheetRef }
107105 goBack = { navigation . goBack }
108106 testID = { BatchSellDestinationTokenSelectorModalSelectorsIDs . SHEET }
109- twClassName = { surfaceClass }
110107 >
111108 < BottomSheetHeader
112109 onClose = { handleClose }
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ import { useSubmitBatchSellTx } from '../../hooks/useSubmitBatchSellTx';
4848import type { BridgeToken } from '../../types' ;
4949import { BatchSellQuoteDetails } from '../BatchSellQuoteDetailsModal' ;
5050import { BatchSellFinalReviewModalSelectorsIDs } from './BatchSellFinalReviewModal.testIds' ;
51- import { useElevatedSurface } from '../../../../../util/theme/themeUtils' ;
5251import { useTrackBatchSellReviewModalSubmitted } from '../../hooks/useTrackBatchSellReviewModalSubmitted' ;
5352
5453const MAX_VISIBLE_SOURCE_TOKEN_AVATARS = 5 ;
@@ -305,7 +304,6 @@ export function BatchSellFinalReviewModal() {
305304 isGasless : batchSellQuoteData . isGasless ,
306305 networkFee : batchSellQuoteData . networkFee ,
307306 } ) ;
308- const surfaceClass = useElevatedSurface ( ) ;
309307 const sheetRef = useRef < BottomSheetRef > ( null ) ;
310308 const [ isTokenDetailsExpanded , setIsTokenDetailsExpanded ] = useState ( false ) ;
311309 const trackBatchSellReviewModalSubmitted =
@@ -433,7 +431,6 @@ export function BatchSellFinalReviewModal() {
433431 ref = { sheetRef }
434432 testID = { BatchSellFinalReviewModalSelectorsIDs . SHEET }
435433 goBack = { navigation . goBack }
436- twClassName = { surfaceClass }
437434 >
438435 < BottomSheetHeader
439436 onClose = { handleClose }
Original file line number Diff line number Diff line change @@ -15,21 +15,18 @@ import { strings } from '../../../../../../locales/i18n';
1515import { useParams } from '../../../../../util/navigation/navUtils' ;
1616import { BatchSellMinimumReceivedInfoModalSelectorsIDs } from './BatchSellMinimumReceivedInfoModal.testIds' ;
1717import { BatchSellMinimumReceivedInfoModalParams } from './BatchSellMinimumReceivedInfoModal.types' ;
18- import { useElevatedSurface } from '../../../../../util/theme/themeUtils' ;
1918
2019export function BatchSellMinimumReceivedInfoModal ( ) {
2120 const navigation = useNavigation < AppStackNavigationProp > ( ) ;
2221 const { sourceModal } = useParams < BatchSellMinimumReceivedInfoModalParams > ( ) ;
2322 const handleBack = sourceModal
2423 ? ( ) => navigation . replace ( sourceModal . screen , sourceModal . params )
2524 : undefined ;
26- const surfaceClass = useElevatedSurface ( ) ;
2725
2826 return (
2927 < BottomSheet
3028 testID = { BatchSellMinimumReceivedInfoModalSelectorsIDs . SHEET }
3129 goBack = { navigation . goBack }
32- twClassName = { surfaceClass }
3330 >
3431 < BottomSheetHeader
3532 onBack = { handleBack }
Original file line number Diff line number Diff line change @@ -15,21 +15,18 @@ import { strings } from '../../../../../../locales/i18n';
1515import { useParams } from '../../../../../util/navigation/navUtils' ;
1616import { BatchSellNetworkFeeInfoModalSelectorsIDs } from './BatchSellNetworkFeeInfoModal.testIds' ;
1717import { BatchSellNetworkFeeInfoModalParams } from './BatchSellNetworkFeeInfoModal.types' ;
18- import { useElevatedSurface } from '../../../../../util/theme/themeUtils' ;
1918
2019export function BatchSellNetworkFeeInfoModal ( ) {
2120 const navigation = useNavigation < AppStackNavigationProp > ( ) ;
2221 const { sourceModal } = useParams < BatchSellNetworkFeeInfoModalParams > ( ) ;
2322 const handleBack = sourceModal
2423 ? ( ) => navigation . replace ( sourceModal . screen , sourceModal . params )
2524 : undefined ;
26- const surfaceClass = useElevatedSurface ( ) ;
2725
2826 return (
2927 < BottomSheet
3028 testID = { BatchSellNetworkFeeInfoModalSelectorsIDs . SHEET }
3129 goBack = { navigation . goBack }
32- twClassName = { surfaceClass }
3330 >
3431 < BottomSheetHeader
3532 onBack = { handleBack }
Original file line number Diff line number Diff line change @@ -17,12 +17,10 @@ import {
1717import { BatchSellQuoteDetails } from './BatchSellQuoteDetails' ;
1818import { BatchSellQuoteDetailsModalSelectorsIDs } from './BatchSellQuoteDetailsModal.testIds' ;
1919import { strings } from '../../../../../../locales/i18n' ;
20- import { useElevatedSurface } from '../../../../../util/theme/themeUtils' ;
2120
2221export function BatchSellQuoteDetailsModal ( ) {
2322 const navigation = useNavigation < AppStackNavigationProp > ( ) ;
2423 const sourceTokens = useSelector ( selectBatchSellSourceTokens ) ;
25- const surfaceClass = useElevatedSurface ( ) ;
2624 const batchSellQuoteData = useBatchSellQuoteData ( {
2725 shouldUpdateBatchSellTrades : false ,
2826 } ) ;
@@ -49,7 +47,6 @@ export function BatchSellQuoteDetailsModal() {
4947 < BottomSheet
5048 testID = { BatchSellQuoteDetailsModalSelectorsIDs . SHEET }
5149 goBack = { navigation . goBack }
52- twClassName = { surfaceClass }
5350 >
5451 < BottomSheetHeader
5552 onClose = { navigation . goBack }
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import {
1919 useSwapBridgeNavigation ,
2020} from '../../hooks/useSwapBridgeNavigation' ;
2121import { HighRateAlertModalSelectorsIDs } from './HighRateAlertModal.testIds' ;
22- import { useElevatedSurface } from '../../../../../util/theme/themeUtils' ;
2322
2423export interface HighRateAlertModalParams {
2524 sourceToken : BridgeToken ;
@@ -34,7 +33,6 @@ export function HighRateAlertModal() {
3433 location : SwapBridgeNavigationLocation . MainView ,
3534 sourcePage : 'BatchSell' ,
3635 } ) ;
37- const surfaceClass = useElevatedSurface ( ) ;
3836
3937 const handleClose = useCallback ( ( ) => {
4038 sheetRef . current ?. onCloseBottomSheet ( ) ;
@@ -51,7 +49,6 @@ export function HighRateAlertModal() {
5149 ref = { sheetRef }
5250 goBack = { goBack }
5351 testID = { HighRateAlertModalSelectorsIDs . SHEET }
54- twClassName = { surfaceClass }
5552 >
5653 < BottomSheetHeader
5754 onClose = { handleClose }
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ import {
2525 Text ,
2626 TextVariant ,
2727} from '@metamask/design-system-react-native' ;
28- import { useElevatedSurface } from '../../../../../util/theme/themeUtils' ;
2928
3029export interface MissingPriceModalParams {
3130 location : MetaMetricsSwapsEventSource ;
@@ -36,7 +35,6 @@ export const MissingPriceModal = () => {
3635 const sheetRef = useRef < BottomSheetRef > ( null ) ;
3736 const [ loading , setLoading ] = useState ( false ) ;
3837 const { location } = useParams < MissingPriceModalParams > ( ) ;
39- const surfaceClass = useElevatedSurface ( ) ;
4038 const sourceToken = useSelector ( selectSourceToken ) ;
4139 const tokenBalance = useLatestBalance ( {
4240 address : sourceToken ?. address ,
@@ -69,7 +67,6 @@ export const MissingPriceModal = () => {
6967 < BottomSheet
7068 ref = { sheetRef }
7169 goBack = { navigation . goBack }
72- twClassName = { surfaceClass }
7370 >
7471 < BottomSheetHeader
7572 onClose = { handleClose }
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import {
1919 BottomSheet ,
2020 BottomSheetRef ,
2121} from '@metamask/design-system-react-native' ;
22- import { useElevatedSurface } from '../../../../../util/theme/themeUtils' ;
2322
2423export const PriceImpactModal = ( ) => {
2524 const { goBack } = useNavigation ( ) ;
@@ -43,7 +42,6 @@ export const PriceImpactModal = () => {
4342 const priceImpactViewData = usePriceImpactViewData (
4443 activeQuote ?. quote . priceData ?. priceImpact ,
4544 ) ;
46- const surfaceClass = useElevatedSurface ( ) ;
4745
4846 const isDangerousPriceImpact = useMemo (
4947 ( ) =>
@@ -68,7 +66,7 @@ export const PriceImpactModal = () => {
6866 } , [ confirmBridge ] ) ;
6967
7068 return (
71- < BottomSheet ref = { sheetRef } goBack = { goBack } twClassName = { surfaceClass } >
69+ < BottomSheet ref = { sheetRef } goBack = { goBack } >
7270 < PriceImpactHeader
7371 onClose = { handleClose }
7472 iconName = { priceImpactViewData . icon ?. name }
You can’t perform that action at this time.
0 commit comments