@@ -12,7 +12,6 @@ import {
1212 TitledSection ,
1313 useBottomSheetModal ,
1414} from '@suite-native/atoms' ;
15- import { FeatureFlag , useFeatureFlag } from '@suite-native/feature-flags' ;
1615import { Icon } from '@suite-native/icons' ;
1716import { Translation } from '@suite-native/intl' ;
1817import { WalletConnectPairBottomSheet } from '@suite-native/module-connect-popup' ;
@@ -25,72 +24,52 @@ import {
2524import { AppSettingsCardWithIconLayout } from './AppSettingsCardWithIconLayout' ;
2625
2726export const ConnectionSettings = ( ) => {
28- const isConnectPopupEnabled = useFeatureFlag ( FeatureFlag . IsConnectPopupEnabled ) ;
29- const isWalletConnectEnabled = useFeatureFlag ( FeatureFlag . IsWalletConnectEnabled ) ;
3027 const { bottomSheetRef, openModal, closeModal } = useBottomSheetModal ( ) ;
3128
3229 const navigation = useNavigation < StackNavigationProps < RootStackParamList , RootStackRoutes > > ( ) ;
3330
34- if ( ! isConnectPopupEnabled && ! isWalletConnectEnabled ) {
35- return null ;
36- }
37-
3831 return (
3932 < TitledSection title = { < Translation id = "moduleSettings.items.connections.title" /> } >
4033 < Card noPadding >
41- { isWalletConnectEnabled && (
42- < AppSettingsCardWithIconLayout
43- icon = "walletConnect"
44- title = {
45- < Translation id = "moduleSettings.items.connections.walletConnect.title" />
46- }
47- onPress = { ( ) => navigation . navigate ( RootStackRoutes . WalletConnectPair ) }
48- testID = "@settings/wallet-connect"
49- borderColor = { null }
50- noShadow
51- />
52- ) }
53- { isWalletConnectEnabled && (
54- < >
55- < CardDivider />
56- < Box paddingHorizontal = "sp16" paddingVertical = "sp12" >
57- < WalletConnectPairBottomSheet
58- ref = { bottomSheetRef }
59- onClose = { closeModal }
60- />
61- < TouchableOpacity
62- onPress = { openModal }
63- testID = "@settings/wallet-connect-add"
64- >
65- < HStack justifyContent = "space-between" alignItems = "center" >
66- < HStack spacing = "sp16" alignItems = "center" >
67- < RoundedIcon
68- name = "qrCode"
69- color = "iconPrimaryDefault"
70- backgroundColor = "backgroundPrimarySubtleOnElevation0"
71- iconSize = "mediumLarge"
72- />
73- < Text color = "textPrimaryDefault" >
74- < Translation id = "moduleSettings.items.connections.walletConnect.add" />
75- </ Text >
76- </ HStack >
77- < Icon name = "plus" color = "textSecondaryHighlight" />
78- </ HStack >
79- </ TouchableOpacity >
80- </ Box >
81- </ >
82- ) }
83- </ Card >
84- { isConnectPopupEnabled && (
8534 < AppSettingsCardWithIconLayout
86- icon = "trezorLogo "
35+ icon = "walletConnect "
8736 title = {
88- < Translation id = "moduleSettings.items.connections.trezorConnect .title" />
37+ < Translation id = "moduleSettings.items.connections.walletConnect .title" />
8938 }
90- onPress = { ( ) => navigation . navigate ( RootStackRoutes . ConnectPermissions ) }
91- testID = "@settings/connect-permissions"
39+ onPress = { ( ) => navigation . navigate ( RootStackRoutes . WalletConnectPair ) }
40+ testID = "@settings/wallet-connect"
41+ borderColor = { null }
42+ noShadow
9243 />
93- ) }
44+
45+ < CardDivider />
46+ < Box paddingHorizontal = "sp16" paddingVertical = "sp12" >
47+ < WalletConnectPairBottomSheet ref = { bottomSheetRef } onClose = { closeModal } />
48+ < TouchableOpacity onPress = { openModal } testID = "@settings/wallet-connect-add" >
49+ < HStack justifyContent = "space-between" alignItems = "center" >
50+ < HStack spacing = "sp16" alignItems = "center" >
51+ < RoundedIcon
52+ name = "qrCode"
53+ color = "iconPrimaryDefault"
54+ backgroundColor = "backgroundPrimarySubtleOnElevation0"
55+ iconSize = "mediumLarge"
56+ />
57+ < Text color = "textPrimaryDefault" >
58+ < Translation id = "moduleSettings.items.connections.walletConnect.add" />
59+ </ Text >
60+ </ HStack >
61+ < Icon name = "plus" color = "textSecondaryHighlight" />
62+ </ HStack >
63+ </ TouchableOpacity >
64+ </ Box >
65+ </ Card >
66+
67+ < AppSettingsCardWithIconLayout
68+ icon = "trezorLogo"
69+ title = { < Translation id = "moduleSettings.items.connections.trezorConnect.title" /> }
70+ onPress = { ( ) => navigation . navigate ( RootStackRoutes . ConnectPermissions ) }
71+ testID = "@settings/connect-permissions"
72+ />
9473 </ TitledSection >
9574 ) ;
9675} ;
0 commit comments