Skip to content

Commit

Permalink
Merge pull request #479 from reservoirprotocol/pedro/grwth-4134-walle…
Browse files Browse the repository at this point in the history
…t-portfolio-on-explorer-has-wrong-currency-icons

Fix wrong icon used in cc icon component due to proxy api being wrong
  • Loading branch information
pedromcunha authored Feb 22, 2024
2 parents a58d9ab + 8a2bfd5 commit cffb44f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/primitives/CryptoCurrencyIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { styled } from '../../stitches.config'
import { StyledComponent } from '@stitches/react/types/styled-component'
import { zeroAddress } from 'viem'
import { useMarketplaceChain } from 'hooks'
import supportedChains, { DefaultChain } from 'utils/chains'

type Props = {
address: string
Expand All @@ -17,10 +18,11 @@ const CryptoCurrencyIcon: FC<Props> = ({
css,
}) => {
const { proxyApi } = useMarketplaceChain()
const chain = supportedChains.find((chain) => chain.id === chainId)

return (
<StyledImg
src={`${process.env.NEXT_PUBLIC_PROXY_URL}${proxyApi}/redirect/currency/${address}/icon/v1`}
src={`${process.env.NEXT_PUBLIC_PROXY_URL}${chain?.proxyApi ?? proxyApi}/redirect/currency/${address}/icon/v1`}
css={css}
/>
)
Expand Down

0 comments on commit cffb44f

Please sign in to comment.