diff --git a/src/components/XUDTTag/index.tsx b/src/components/XUDTTag/index.tsx index 6aaf3d7d1..eef06c74e 100644 --- a/src/components/XUDTTag/index.tsx +++ b/src/components/XUDTTag/index.tsx @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next' import { useHistory } from 'react-router-dom' import styles from './styles.module.scss' -const HIDDEN_TAGS = ['duplicate', 'suspicious'] +const HIDDEN_TAGS = ['duplicate', 'suspicious', 'supply-unlimited'] const XUDTTag = ({ tagName }: { tagName: string }) => { const { t } = useTranslation() @@ -19,6 +19,13 @@ const XUDTTag = ({ tagName }: { tagName: string }) => { content = content.replace('Platform', tag.replace('verified-on-', '')) tag = 'verified-on' } + + // FIXME: data should be updated in the backend + // issue: https://github.com/Magickbase/ckb-explorer-public-issues/issues/754 + if (tag === 'rgbpp-compatible') { + content = 'RGB++' + } + const handleClick = () => { const search = new URLSearchParams(window.location.search) const tags = search.get('tags')?.split(',') ?? [] diff --git a/src/pages/Xudt/UDTComp.tsx b/src/pages/Xudt/UDTComp.tsx index abfcb36b1..8b7d5d6ad 100644 --- a/src/pages/Xudt/UDTComp.tsx +++ b/src/pages/Xudt/UDTComp.tsx @@ -180,6 +180,13 @@ export const UDTOverviewCard = ({ ) + const tags = xudt?.xudtTags ?? [] + // FIXME: data should be updated in the backend + // issue: https://github.com/Magickbase/ckb-explorer-public-issues/issues/754 + if (!tags.includes('rgbpp-compatible')) { + tags.unshift('rgbpp-compatible') + } + return ( <> @@ -194,7 +201,7 @@ export const UDTOverviewCard = ({ />
- {xudt?.xudtTags?.map(tag => ( + {tags.map(tag => ( ))}
diff --git a/src/pages/Xudts/index.tsx b/src/pages/Xudts/index.tsx index 94a985faa..19bba73e5 100644 --- a/src/pages/Xudts/index.tsx +++ b/src/pages/Xudts/index.tsx @@ -52,18 +52,6 @@ const filterList = [ title: , to: '/xudts', }, - { - key: 'supply-unlimited', - value: 'supply-unlimited', - title: , - to: '/xudts', - }, - { - key: 'rgbpp-compatible', - value: 'rgbpp-compatible', - title: , - to: '/xudts', - }, ] const TokenInfo: FC<{ token: XUDT }> = ({ token }) => { @@ -311,7 +299,12 @@ const Xudts = () => { throw new Error('Tokens empty') } return { - tokens, + tokens: tokens.map(token => ({ + ...token, + // FIXME: data should be updated in the backend + // issue: https://github.com/Magickbase/ckb-explorer-public-issues/issues/754 + xudtTags: token.xudtTags?.filter(tag => tag !== 'rgbpp-compatible'), + })), total, pageSize, }