From b4050172e3d821c7dde2875fc9839db6c6cca728 Mon Sep 17 00:00:00 2001 From: gantunesr Date: Sat, 16 Apr 2022 16:11:12 -0400 Subject: [PATCH 1/2] Add ticker to SelectQRAccounts --- .../ConnectQRHardware/SelectQRAccounts/index.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/components/Views/ConnectQRHardware/SelectQRAccounts/index.tsx b/app/components/Views/ConnectQRHardware/SelectQRAccounts/index.tsx index 52b02a7fc7e..4bbf20c510b 100644 --- a/app/components/Views/ConnectQRHardware/SelectQRAccounts/index.tsx +++ b/app/components/Views/ConnectQRHardware/SelectQRAccounts/index.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { View, Text, FlatList, StyleSheet, TouchableOpacity } from 'react-native'; +import { useSelector } from 'react-redux'; +import { useNavigation } from '@react-navigation/native'; +import CheckBox from '@react-native-community/checkbox'; import { strings } from '../../../../../locales/i18n'; import Icon from 'react-native-vector-icons/FontAwesome'; import { fontStyles } from '../../../../styles/common'; -import CheckBox from '@react-native-community/checkbox'; import { IAccount } from '../types'; import { renderFromWei } from '../../../../util/number'; -import { useSelector } from 'react-redux'; -import { useNavigation } from '@react-navigation/native'; import { getEtherscanAddressUrl } from '../../../../util/etherscan'; import { mockTheme, useAppThemeFromContext } from '../../../../util/theme'; import EthereumAddress from '../../../UI/EthereumAddress'; @@ -97,6 +97,7 @@ const SelectQRAccounts = (props: ISelectQRAccountsProps) => { const styles = createStyle(colors); const navigation = useNavigation(); const provider = useSelector((state: any) => state.engine.backgroundState.NetworkController.provider); + const ticker = useSelector((state: any) => state.engine.backgroundState.NetworkController.provider.ticker); const toEtherscan = (address: string) => { const accountLink = getEtherscanAddressUrl(provider.type, address); @@ -127,7 +128,9 @@ const SelectQRAccounts = (props: ISelectQRAccountsProps) => { /> {item.index} - {renderFromWei(item.balance)} ETH + + {renderFromWei(item.balance)} {ticker} + Date: Sun, 17 Apr 2022 23:49:29 -0400 Subject: [PATCH 2/2] Remove unnecessary selector --- .../Views/ConnectQRHardware/SelectQRAccounts/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/components/Views/ConnectQRHardware/SelectQRAccounts/index.tsx b/app/components/Views/ConnectQRHardware/SelectQRAccounts/index.tsx index 4bbf20c510b..68c1700eba3 100644 --- a/app/components/Views/ConnectQRHardware/SelectQRAccounts/index.tsx +++ b/app/components/Views/ConnectQRHardware/SelectQRAccounts/index.tsx @@ -97,7 +97,6 @@ const SelectQRAccounts = (props: ISelectQRAccountsProps) => { const styles = createStyle(colors); const navigation = useNavigation(); const provider = useSelector((state: any) => state.engine.backgroundState.NetworkController.provider); - const ticker = useSelector((state: any) => state.engine.backgroundState.NetworkController.provider.ticker); const toEtherscan = (address: string) => { const accountLink = getEtherscanAddressUrl(provider.type, address); @@ -129,7 +128,7 @@ const SelectQRAccounts = (props: ISelectQRAccountsProps) => { {item.index} - {renderFromWei(item.balance)} {ticker} + {renderFromWei(item.balance)} {provider.ticker}