fix: adding pool icon to sudo assets (#5395)

This commit is contained in:
Jack Short 2022-11-23 17:53:56 -05:00 committed by GitHub
parent 9dba68b34c
commit 304cd72eed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

@ -6,7 +6,7 @@ import Tooltip from 'components/Tooltip'
import { Box } from 'nft/components/Box'
import { bodySmall } from 'nft/css/common.css'
import { useBag } from 'nft/hooks'
import { GenieAsset, Markets, TokenType } from 'nft/types'
import { GenieAsset, isPooledMarket, TokenType } from 'nft/types'
import { formatWeiToDecimal, rarityProviderLogo } from 'nft/utils'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import styled from 'styled-components/macro'
@ -167,7 +167,7 @@ export const CollectionAsset = ({
<Card.SecondaryInfo>
{notForSale ? '' : `${formatWeiToDecimal(asset.priceInfo.ETHPrice, true)} ETH`}
</Card.SecondaryInfo>
{(asset.marketplace === Markets.NFTX || asset.marketplace === Markets.NFT20) && <Card.Pool />}
{isPooledMarket(asset.marketplace) && <Card.Pool />}
</Card.SecondaryDetails>
{asset.tokenType !== TokenType.ERC1155 && asset.marketplace && (
<Card.MarketplaceIcon marketplace={asset.marketplace} />

@ -155,7 +155,8 @@ export enum Markets {
CryptoPhunks = 'cryptophunks',
}
export const isPooledMarket = (market: Markets): boolean => {
export const isPooledMarket = (market?: Markets): boolean => {
if (!market) return false
return market === Markets.NFTX || market === Markets.NFT20 || market === Markets.Sudoswap
}