@@ -6,15 +6,18 @@ import { useHandler } from '../../hooks/useHandler'
66import { lstrings } from '../../locales/strings'
77import { useSelector } from '../../types/reactRedux'
88import type { EdgeAppSceneProps } from '../../types/routerTypes'
9+ import { EdgeCard } from '../cards/EdgeCard'
910import { SceneWrapper } from '../common/SceneWrapper'
1011import { CryptoIcon } from '../icons/CryptoIcon'
12+ import { SceneContainer } from '../layout/SceneContainer'
1113import { showToast } from '../services/AirshipInstance'
1214import { cacheStyles , type Theme , useTheme } from '../services/ThemeContext'
15+ import { SettingsRow } from '../settings/SettingsRow'
1316import { SettingsTappableRow } from '../settings/SettingsTappableRow'
1417
1518interface Props extends EdgeAppSceneProps < 'assetSettings' > { }
1619
17- export function AssetSettingsScene ( props : Props ) {
20+ export function AssetSettingsScene ( props : Props ) : React . ReactElement {
1821 const { navigation } = props
1922 const theme = useTheme ( )
2023 const styles = getStyles ( theme )
@@ -52,49 +55,55 @@ export function AssetSettingsScene(props: Props) {
5255
5356 return (
5457 < SceneWrapper scroll >
55- < SettingsTappableRow
56- key = "detectTokens"
57- label = { lstrings . settings_detect_tokens }
58- onPress = { handleRescanTokens }
59- >
60- < FontAwesomeIcon
61- style = { styles . icon }
62- name = "refresh"
63- size = { theme . rem ( 1.25 ) }
64- color = { theme . iconTappable }
65- />
66- </ SettingsTappableRow >
67- { CURRENCY_SETTINGS_KEYS . map ( pluginId => {
68- if ( account . currencyConfig [ pluginId ] == null ) return null
69- const { currencyInfo } = account . currencyConfig [ pluginId ]
70- const { displayName } = currencyInfo
71- const onPress = ( ) => {
72- navigation . navigate ( 'currencySettings' , {
73- currencyInfo
74- } )
75- }
58+ < SceneContainer >
59+ < EdgeCard >
60+ < SettingsRow
61+ label = { lstrings . settings_detect_tokens }
62+ onPress = { handleRescanTokens }
63+ right = {
64+ < FontAwesomeIcon
65+ name = "refresh"
66+ size = { theme . rem ( 1 ) }
67+ color = { theme . iconTappable }
68+ style = { styles . rightIcon }
69+ />
70+ }
71+ />
72+ </ EdgeCard >
73+ < EdgeCard sections >
74+ { CURRENCY_SETTINGS_KEYS . map ( pluginId => {
75+ if ( account . currencyConfig [ pluginId ] == null ) return null
76+ const { currencyInfo } = account . currencyConfig [ pluginId ]
77+ const { displayName } = currencyInfo
78+ const onPress = ( ) : void => {
79+ navigation . navigate ( 'currencySettings' , {
80+ currencyInfo
81+ } )
82+ }
7683
77- return (
78- < SettingsTappableRow
79- key = { pluginId }
80- label = { displayName }
81- onPress = { onPress }
82- >
83- < CryptoIcon
84- marginRem = { [ 0.5 , 0 , 0.5 , 0.5 ] }
85- pluginId = { pluginId }
86- tokenId = { null }
87- sizeRem = { 1.25 }
88- />
89- </ SettingsTappableRow >
90- )
91- } ) }
84+ return (
85+ < SettingsTappableRow
86+ key = { pluginId }
87+ label = { displayName }
88+ onPress = { onPress }
89+ >
90+ < CryptoIcon
91+ marginRem = { [ 0.5 , 0 , 0.5 , 0.5 ] }
92+ pluginId = { pluginId }
93+ tokenId = { null }
94+ sizeRem = { 1.25 }
95+ />
96+ </ SettingsTappableRow >
97+ )
98+ } ) }
99+ </ EdgeCard >
100+ </ SceneContainer >
92101 </ SceneWrapper >
93102 )
94103}
95104
96105const getStyles = cacheStyles ( ( theme : Theme ) => ( {
97- icon : {
98- marginLeft : theme . rem ( 0.6 )
106+ rightIcon : {
107+ marginHorizontal : theme . rem ( 0.5 )
99108 }
100109} ) )
0 commit comments