From ec405c0164bab7296e6bf58ddb3c883b0e814c8c Mon Sep 17 00:00:00 2001 From: Leandro Date: Wed, 16 Mar 2022 15:33:45 -0700 Subject: [PATCH] Fix Native token address on activity details --- .../lib/hooks/useCurrencyLogoURIs/useCurrencyLogoURIsMod.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/custom/lib/hooks/useCurrencyLogoURIs/useCurrencyLogoURIsMod.ts b/src/custom/lib/hooks/useCurrencyLogoURIs/useCurrencyLogoURIsMod.ts index 5da71b73ae..3a82e01efc 100644 --- a/src/custom/lib/hooks/useCurrencyLogoURIs/useCurrencyLogoURIsMod.ts +++ b/src/custom/lib/hooks/useCurrencyLogoURIs/useCurrencyLogoURIsMod.ts @@ -10,6 +10,7 @@ import EthereumLogo from 'assets/images/ethereum-logo.png' // MOD imports import XDaiLogo from 'assets/cow-swap/xdai.png' import { ADDRESS_IMAGE_OVERRIDE } from 'constants/tokens' +import { NATIVE_CURRENCY_BUY_ADDRESS } from 'constants/index' type Network = 'ethereum' | /*'arbitrum' | 'optimism'*/ 'xdai' | 'rinkeby' @@ -56,7 +57,8 @@ export default function useCurrencyLogoURIs(currency?: Currency | null): string[ return useMemo(() => { const logoURIs = [...locations] if (currency) { - if (currency.isNative) { + // mod: CowSwap Native buy orders have address set to EeeEE... rather than `isNative` flag + if (currency.isNative || currency.address === NATIVE_CURRENCY_BUY_ADDRESS) { logoURIs.push(getNativeLogoURI(currency.chainId)) } else if (currency.isToken) { // mod