Skip to content

Commit 5b7725e

Browse files
authored
Add a version identifier to the settings menu (#881)
* Add idetifier if wallet is EOA or relay and remove touchable as these should not be buttons * Add <View>s back in for formatting.
1 parent 2caeb8f commit 5b7725e

File tree

1 file changed

+30
-50
lines changed

1 file changed

+30
-50
lines changed

src/screens/settings/SettingsScreen.tsx

Lines changed: 30 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { version } from 'package.json'
22
import { useCallback, useContext, useEffect, useMemo } from 'react'
33
import { useTranslation } from 'react-i18next'
44
import { Platform, ScrollView, StyleSheet, View } from 'react-native'
5+
import Config from 'react-native-config'
56

67
import { AppTouchable, Typography } from 'components/index'
78
import { getWalletSetting } from 'core/config'
@@ -152,60 +153,39 @@ export const SettingsScreen = ({
152153
</Typography>
153154
</AppTouchable>
154155
<View style={styles.bottomView}>
155-
<AppTouchable
156-
width={'100%'}
157-
accessibilityLabel="version"
158-
style={styles.footerItem}
159-
onPress={goToWalletBackup}>
160-
<Typography type={'body1'} color={sharedColors.labelLight}>
161-
{t('settings_screen_version')} {version}
156+
<View style={styles.settingsItem}>
157+
<Typography type={'h4'} color={sharedColors.labelLight}>
158+
{t('settings_screen_version')} {version}-
159+
{Config.USE_RELAY ? 'relay' : 'eoa'}
162160
</Typography>
163-
</AppTouchable>
161+
</View>
164162

165-
<AppTouchable
166-
width={'100%'}
167-
accessibilityLabel="Smart Wallet Factory"
168-
style={styles.footerItem}
169-
onPress={goToWalletBackup}>
170-
<>
171-
<Typography type={'h4'} color={sharedColors.labelLight}>
172-
{t('settings_screen_smart_wallet_factory')}
173-
</Typography>
174-
<Typography type={'h5'} color={sharedColors.labelLight}>
175-
{smartWalletFactoryAddress}
176-
</Typography>
177-
</>
178-
</AppTouchable>
163+
<View style={styles.settingsItem}>
164+
<Typography type={'h4'} color={sharedColors.labelLight}>
165+
{t('settings_screen_smart_wallet_factory')}
166+
</Typography>
167+
<Typography type={'h5'} color={sharedColors.labelLight}>
168+
{smartWalletFactoryAddress}
169+
</Typography>
170+
</View>
179171

180-
<AppTouchable
181-
width={'100%'}
182-
accessibilityLabel="security"
183-
style={styles.footerItem}
184-
onPress={goToWalletBackup}>
185-
<>
186-
<Typography type={'h4'} color={sharedColors.labelLight}>
187-
{t('settings_screen_rpc_url')}
188-
</Typography>
189-
<Typography type={'h5'} color={sharedColors.labelLight}>
190-
{rpcUrl}
191-
</Typography>
192-
</>
193-
</AppTouchable>
172+
<View style={styles.settingsItem}>
173+
<Typography type={'h4'} color={sharedColors.labelLight}>
174+
{t('settings_screen_rpc_url')}
175+
</Typography>
176+
<Typography type={'h5'} color={sharedColors.labelLight}>
177+
{rpcUrl}
178+
</Typography>
179+
</View>
194180

195-
<AppTouchable
196-
width={'100%'}
197-
accessibilityLabel="Backend URL"
198-
style={styles.footerItem}
199-
onPress={goToWalletBackup}>
200-
<>
201-
<Typography type={'h4'} color={sharedColors.labelLight}>
202-
{t('settings_screen_backend_url')}
203-
</Typography>
204-
<Typography type={'h5'} color={sharedColors.labelLight}>
205-
{walletServiceUrl}
206-
</Typography>
207-
</>
208-
</AppTouchable>
181+
<View style={styles.settingsItem}>
182+
<Typography type={'h4'} color={sharedColors.labelLight}>
183+
{t('settings_screen_backend_url')}
184+
</Typography>
185+
<Typography type={'h5'} color={sharedColors.labelLight}>
186+
{walletServiceUrl}
187+
</Typography>
188+
</View>
209189
</View>
210190
</ScrollView>
211191
)

0 commit comments

Comments
 (0)