From 4fc812d6799539a0564eed29e053aef9af904112 Mon Sep 17 00:00:00 2001 From: jinchung Date: Sat, 21 Oct 2023 19:02:34 -0400 Subject: [PATCH] Update components using FastCoinIcon to pass network instead of assetType --- .../FastComponents/FastBalanceCoinRow.tsx | 2 +- .../FastComponents/FastCurrencySelectionRow.tsx | 4 ++-- src/components/coin-icon/CoinIcon.tsx | 15 +++++++++++++-- .../coin-row/FastTransactionCoinRow.tsx | 4 ++-- src/components/exchange/ExchangeTokenRow.tsx | 4 ++-- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/components/asset-list/RecyclerAssetList2/FastComponents/FastBalanceCoinRow.tsx b/src/components/asset-list/RecyclerAssetList2/FastComponents/FastBalanceCoinRow.tsx index 7967ba91228..edaa91a98bf 100644 --- a/src/components/asset-list/RecyclerAssetList2/FastComponents/FastBalanceCoinRow.tsx +++ b/src/components/asset-list/RecyclerAssetList2/FastComponents/FastBalanceCoinRow.tsx @@ -140,7 +140,7 @@ const MemoizedBalanceCoinRow = React.memo( = ({ const theme = useTheme(); + const network = mainnet_address + ? Network.mainnet + : type + ? ethereumUtils.getNetworkFromType(type) + : Network.mainnet; + return ( {isNotContractInteraction ? ( @@ -78,7 +89,7 @@ const CoinIcon: React.FC = ({ } size={size} symbol={symbol} - network={mainnet_address ? Network.mainnet : type} + network={network} theme={theme} /> ) : ( diff --git a/src/components/coin-row/FastTransactionCoinRow.tsx b/src/components/coin-row/FastTransactionCoinRow.tsx index 19511125b42..db7d0343e1f 100644 --- a/src/components/coin-row/FastTransactionCoinRow.tsx +++ b/src/components/coin-row/FastTransactionCoinRow.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useMemo } from 'react'; +import React, { useCallback } from 'react'; import { StyleSheet, View } from 'react-native'; import { ButtonPressAnimation } from '../animations'; import FastCoinIcon from '../asset-list/RecyclerAssetList2/FastComponents/FastCoinIcon'; @@ -154,7 +154,7 @@ export default React.memo(function TransactionCoinRow({ ) : (