Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…r-frontend into develop
  • Loading branch information
Keith-CY committed Aug 2, 2024
2 parents 613f78e + 3595225 commit 7dafe58
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
14 changes: 13 additions & 1 deletion src/components/NFTTag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,26 @@ import { useTranslation } from 'react-i18next'
import { useHistory } from 'react-router-dom'
import styles from './styles.module.scss'

export const whiteList = ['invalid', 'suspicious', 'out-of-length-range', 'rgb++', 'layer-1-asset', 'layer-2-asset']
export const whiteList = [
// 'suspicious',
// 'invalid',
// 'out-of-length-range',
'rgbpp-compatible',
'rgb++',
'layer-1-asset',
'layer-2-asset',
]

const NFTTag = ({ tagName, to }: { tagName: string; to?: string }) => {
const { t } = useTranslation()
const { push } = useHistory()

let tag = tagName

let content = t(`xudt.tags.${tag}`)
if (['rgb++', 'rgbpp-compatible'].includes(tag)) {
content = 'RGB++'
}
if (tag.startsWith('verified-on-')) {
// FIXME: should be i18n
content = content.replace('Platform', tag.replace('verified-on-', ''))
Expand Down
1 change: 1 addition & 0 deletions src/components/NFTTag/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
color: #00a7cc;
}

&[data-type='rgbpp-compatible'],
&[data-type='rgb++'] {
border: none;
background: linear-gradient(90deg, #ffd176 0.23%, #ffdb81 6.7%, #84ffcb 99.82%);
Expand Down
2 changes: 1 addition & 1 deletion src/components/XUDTTag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const XUDTTag = ({ tagName, to }: { tagName: string; to?: string }) => {

// FIXME: data should be updated in the backend
// issue: https://github.com/Magickbase/ckb-explorer-public-issues/issues/754
if (tag === 'rgb++') {
if (tag === 'rgb++' || tag === 'rgbpp-compatible') {
content = 'RGB++'
}

Expand Down
1 change: 1 addition & 0 deletions src/components/XUDTTag/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
color: #00a7cc;
}

&[data-type='rgbpp-compatible'],
&[data-type='rgb++'] {
border: none;
background: linear-gradient(90deg, #ffd176 0.23%, #ffdb81 6.7%, #84ffcb 99.82%);
Expand Down
5 changes: 0 additions & 5 deletions src/pages/Xudt/UDTComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,6 @@ 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('rgb++')) {
tags.unshift('rgb++')
}

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Xudts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ const Xudts = () => {
...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 !== 'rgb++'),
xudtTags: token.xudtTags?.filter(tag => !['rgb++', 'rgbpp-compatible'].includes(tag)),
})),
total,
pageSize,
Expand Down

0 comments on commit 7dafe58

Please sign in to comment.