From e239fb8d932b3255249133ff89dc582e1005e107 Mon Sep 17 00:00:00 2001 From: skylarbarrera Date: Tue, 26 Sep 2023 13:38:11 -0400 Subject: [PATCH 1/3] test --- src/utils/getTokenMetadata.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/utils/getTokenMetadata.ts b/src/utils/getTokenMetadata.ts index 4b66144bc3f..7fe8d25d747 100644 --- a/src/utils/getTokenMetadata.ts +++ b/src/utils/getTokenMetadata.ts @@ -5,10 +5,5 @@ import { rainbowTokenList } from '@/references'; export default function getTokenMetadata( tokenAddress: string | undefined ): Omit | undefined { - if (!tokenAddress) return undefined; - const metadata: TokenMetadata = - rainbowTokenList.RAINBOW_TOKEN_LIST[tokenAddress.toLowerCase()]; - - // delete chain metadata - return omitFlatten(metadata, ['chainId', 'decimals']); + return undefined; } From a4cc0cf2490da8638be67b2d24cb29a22266557b Mon Sep 17 00:00:00 2001 From: skylarbarrera Date: Wed, 4 Oct 2023 12:20:41 -0400 Subject: [PATCH 2/3] fix coinICon issue --- .../RecyclerAssetList2/FastComponents/FastCoinIcon.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/asset-list/RecyclerAssetList2/FastComponents/FastCoinIcon.tsx b/src/components/asset-list/RecyclerAssetList2/FastComponents/FastCoinIcon.tsx index e99447130f5..73a62443b35 100644 --- a/src/components/asset-list/RecyclerAssetList2/FastComponents/FastCoinIcon.tsx +++ b/src/components/asset-list/RecyclerAssetList2/FastComponents/FastCoinIcon.tsx @@ -84,22 +84,18 @@ export default React.memo(function FastCoinIcon({ mainnetAddress, }); - const tokenMetadata = getTokenMetadata(resolvedAddress); - const fallbackIconColor = useColorForAsset({ address: resolvedAddress, type: resolvedType, }); - const shadowColor = theme.isDarkMode - ? colors.shadow - : tokenMetadata?.shadowColor ?? fallbackIconColor; + const shadowColor = theme.isDarkMode ? colors.shadow : fallbackIconColor; const eth = isETH(resolvedAddress); const formattedSymbol = formatSymbol(symbol); - const shouldRenderFallback = !eth && !tokenMetadata; + const shouldRenderFallback = !eth; const shouldRenderLocalCoinIconImage = !shouldRenderFallback && !!CoinIconsImages[formattedSymbol]; const shouldRenderContract = symbol === 'contract'; From cdb8bc6df23f084cff321a98e373e4886881d6b2 Mon Sep 17 00:00:00 2001 From: skylarbarrera Date: Wed, 4 Oct 2023 12:25:28 -0400 Subject: [PATCH 3/3] clean up coin icon --- src/components/coin-icon/CoinIcon.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/coin-icon/CoinIcon.tsx b/src/components/coin-icon/CoinIcon.tsx index 9236206a475..de467b9d627 100644 --- a/src/components/coin-icon/CoinIcon.tsx +++ b/src/components/coin-icon/CoinIcon.tsx @@ -57,14 +57,12 @@ const CoinIcon: React.FC = ({ mainnet_address, ...props }) => { - const tokenMetadata = getTokenMetadata(mainnet_address || address); const color = useColorForAsset({ address: mainnet_address || address, type: mainnet_address ? AssetTypes.token : type, }); const { colors, isDarkMode } = useTheme(); - const forceFallback = - !isETH(mainnet_address || address) && isNil(tokenMetadata); + const forceFallback = !isETH(mainnet_address || address); const isNotContractInteraction = useMemo(() => symbol !== 'contract', [ symbol, ]); @@ -83,8 +81,7 @@ const CoinIcon: React.FC = ({ // force update on change symbol due to ImageCache strategy key={symbol} shadowColor={ - forcedShadowColor || - (isDarkMode ? colors.shadow : tokenMetadata?.shadowColor || color) + forcedShadowColor || (isDarkMode ? colors.shadow : color) } size={size} symbol={symbol}