Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use isRepatedSymbol to mark omiga inscription's symbol repeated #264

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/models/UDT/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export interface OmigaInscriptionCollection extends UDT {
expectedSupply: string
inscriptionInfoId: string
infoTypeHash: string
isRepeatedSymbol: boolean
}

export function isOmigaInscriptionCollection(udt: UDT): udt is OmigaInscriptionCollection {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Tokens/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const TokenInfo: FC<{ token: UDT | OmigaInscriptionCollection }> = ({ token }) =
return (
<div key={token.typeHash} className={styles.tokenInfo}>
<span>
{isOmigaInscriptionCollection(token) && !token.published && (
{isOmigaInscriptionCollection(token) && token.isRepeatedSymbol && (
<Tooltip placement="topLeft" title={t('udt.repeat_inscription_symbol')} arrowPointAtCenter>
<WarningOutlined style={{ fontSize: '16px', color: '#FFB21E' }} />
</Tooltip>
Expand Down Expand Up @@ -220,7 +220,7 @@ const TokenTable: FC<{
return (
<div className={styles.container}>
<div className={styles.warningIcon}>
{isOmigaInscriptionCollection(token) && !token.published && (
{isOmigaInscriptionCollection(token) && token.isRepeatedSymbol && (
<Tooltip title={t('udt.repeat_inscription_symbol')}>
<WarningOutlined style={{ fontSize: '16px', color: '#FFB21E' }} />
</Tooltip>
Expand Down
1 change: 1 addition & 0 deletions src/pages/UDT/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ export const defaultOmigaInscriptionInfo: OmigaInscriptionCollection = {
expectedSupply: '0',
inscriptionInfoId: '',
infoTypeHash: '',
isRepeatedSymbol: false,
}