Commit 772416cc authored by Charles Bachmeier's avatar Charles Bachmeier Committed by GitHub

feat: add collection blocklist for ip infringement (#6022)

Co-authored-by: default avatarCharles Bachmeier <charlie@genie.xyz>
parent f15e5725
......@@ -15,6 +15,7 @@ import { CollectionPageSkeleton } from 'nft/components/collection/CollectionPage
import { BagCloseIcon } from 'nft/components/icons'
import { useBag, useCollectionFilters, useFiltersExpanded, useIsMobile } from 'nft/hooks'
import * as styles from 'nft/pages/collection/index.css'
import { blocklistedCollections } from 'nft/utils'
import { Suspense, useEffect } from 'react'
import { useLocation, useNavigate, useParams } from 'react-router-dom'
import { animated, easings, useSpring } from 'react-spring'
......@@ -188,7 +189,7 @@ const Collection = () => {
width: CollectionContainerWidthChange.to((x) => `calc(100% - ${x as number}px)`),
}}
>
{contractAddress ? (
{contractAddress && !blocklistedCollections.includes(contractAddress) ? (
<>
<BannerWrapper>
<Banner
......
import { isAddress } from '@ethersproject/address'
import { blocklistedCollections } from 'nft/utils'
import { GenieCollection } from '../../types'
......@@ -45,7 +46,9 @@ export const fetchSearchCollections = async (addressOrName: string, recursive =
if (isName) {
const data = await r.json()
const formattedData = data?.data
? data.data.map((collection: { stats: Record<string, unknown>; floorPrice: string }) => {
? data.data
.filter((collection: { address: string }) => !blocklistedCollections.includes(collection.address))
.map((collection: { stats: Record<string, unknown>; floorPrice: string }) => {
return {
...collection,
stats: {
......
import { blocklistedCollections } from 'nft/utils'
import { TimePeriod, TrendingCollection } from '../../types'
const NFT_API_URL = process.env.REACT_APP_TEMP_API_URL
......@@ -18,5 +20,5 @@ export const fetchTrendingCollections = async (payload: {
const data = await r.json()
return data ?? []
return data.filter((collection: { address: string }) => !blocklistedCollections.includes(collection.address)) ?? []
}
......@@ -22,3 +22,8 @@ export const isInSameSudoSwapPool = (assetA: GenieAsset, assetB: GenieAsset): bo
export const isInSameMarketplaceCollection = (assetA: GenieAsset, assetB: GenieAsset): boolean => {
return assetA.address === assetB.address && assetA.marketplace === assetB.marketplace
}
export const blocklistedCollections = [
'0xd5eeac01b0d1d929d6cffaaf78020af137277293',
'0x85c08fffa9510f87019efdcf986301873cbb10d6',
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment