Skip to content

Commit

Permalink
Add a version identifier to the settings menu (#881)
Browse files Browse the repository at this point in the history
* Add idetifier if wallet is EOA or relay and remove touchable as these should not be buttons

* Add <View>s back in for formatting.
  • Loading branch information
jessgusclark authored Feb 2, 2024
1 parent 2caeb8f commit 5b7725e
Showing 1 changed file with 30 additions and 50 deletions.
80 changes: 30 additions & 50 deletions src/screens/settings/SettingsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { version } from 'package.json'
import { useCallback, useContext, useEffect, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import { Platform, ScrollView, StyleSheet, View } from 'react-native'
import Config from 'react-native-config'

import { AppTouchable, Typography } from 'components/index'
import { getWalletSetting } from 'core/config'
Expand Down Expand Up @@ -152,60 +153,39 @@ export const SettingsScreen = ({
</Typography>
</AppTouchable>
<View style={styles.bottomView}>
<AppTouchable
width={'100%'}
accessibilityLabel="version"
style={styles.footerItem}
onPress={goToWalletBackup}>
<Typography type={'body1'} color={sharedColors.labelLight}>
{t('settings_screen_version')} {version}
<View style={styles.settingsItem}>
<Typography type={'h4'} color={sharedColors.labelLight}>
{t('settings_screen_version')} {version}-
{Config.USE_RELAY ? 'relay' : 'eoa'}
</Typography>
</AppTouchable>
</View>

<AppTouchable
width={'100%'}
accessibilityLabel="Smart Wallet Factory"
style={styles.footerItem}
onPress={goToWalletBackup}>
<>
<Typography type={'h4'} color={sharedColors.labelLight}>
{t('settings_screen_smart_wallet_factory')}
</Typography>
<Typography type={'h5'} color={sharedColors.labelLight}>
{smartWalletFactoryAddress}
</Typography>
</>
</AppTouchable>
<View style={styles.settingsItem}>
<Typography type={'h4'} color={sharedColors.labelLight}>
{t('settings_screen_smart_wallet_factory')}
</Typography>
<Typography type={'h5'} color={sharedColors.labelLight}>
{smartWalletFactoryAddress}
</Typography>
</View>

<AppTouchable
width={'100%'}
accessibilityLabel="security"
style={styles.footerItem}
onPress={goToWalletBackup}>
<>
<Typography type={'h4'} color={sharedColors.labelLight}>
{t('settings_screen_rpc_url')}
</Typography>
<Typography type={'h5'} color={sharedColors.labelLight}>
{rpcUrl}
</Typography>
</>
</AppTouchable>
<View style={styles.settingsItem}>
<Typography type={'h4'} color={sharedColors.labelLight}>
{t('settings_screen_rpc_url')}
</Typography>
<Typography type={'h5'} color={sharedColors.labelLight}>
{rpcUrl}
</Typography>
</View>

<AppTouchable
width={'100%'}
accessibilityLabel="Backend URL"
style={styles.footerItem}
onPress={goToWalletBackup}>
<>
<Typography type={'h4'} color={sharedColors.labelLight}>
{t('settings_screen_backend_url')}
</Typography>
<Typography type={'h5'} color={sharedColors.labelLight}>
{walletServiceUrl}
</Typography>
</>
</AppTouchable>
<View style={styles.settingsItem}>
<Typography type={'h4'} color={sharedColors.labelLight}>
{t('settings_screen_backend_url')}
</Typography>
<Typography type={'h5'} color={sharedColors.labelLight}>
{walletServiceUrl}
</Typography>
</View>
</View>
</ScrollView>
)
Expand Down

0 comments on commit 5b7725e

Please sign in to comment.