Skip to content

Commit

Permalink
Fix Native token address on activity details
Browse files Browse the repository at this point in the history
  • Loading branch information
Leandro committed Mar 16, 2022
1 parent 78c793f commit ec405c0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ec405c0

Please sign in to comment.