Skip to content

Commit

Permalink
Include contract verification info in token lists
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag committed Jul 1, 2023
1 parent 7df4189 commit 586240e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changelog/638.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Include contract verification info in token lists
5 changes: 5 additions & 0 deletions src/app/components/Tokens/TokenDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { CopyToClipboard } from '../CopyToClipboard'
import { AccountLink } from '../Account/AccountLink'
import { DashboardLink } from '../../pages/ParatimeDashboardPage/DashboardLink'
import { LongDataDisplay } from '../LongDataDisplay'
import { DelayedContractVerificationInfo } from '../Account/ContractVerificationInfo'

export const TokenDetails: FC<{
isLoading?: boolean
Expand Down Expand Up @@ -44,6 +45,10 @@ export const TokenDetails: FC<{
<CopyToClipboard value={token.eth_contract_addr ?? token.contract_addr} />
</span>
</dd>
<dt>{t('contract.verification.title')}</dt>
<dd>
<DelayedContractVerificationInfo scope={token} contractOasisAddress={token.contract_addr} />{' '}
</dd>

<dt>{t(isMobile ? 'tokens.holdersCount_short' : 'tokens.holdersCount')}</dt>
<dd>{token.num_holders.toLocaleString()}</dd>
Expand Down
12 changes: 12 additions & 0 deletions src/app/components/Tokens/TokenList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { TablePaginationProps } from '../Table/TablePagination'
import { AccountLink } from '../Account/AccountLink'
import { TokenLink } from './TokenLink'
import { CopyToClipboard } from '../CopyToClipboard'
import { DelayedContractVerificationInfo } from '../Account/ContractVerificationInfo'

type TokensProps = {
tokens?: EvmToken[]
Expand All @@ -20,6 +21,7 @@ export const TokenList = (props: TokensProps) => {
{ key: 'index', content: '' },
{ key: 'name', content: t('common.name') },
{ key: 'contract', content: t('common.smartContract') },
{ key: 'verification', content: t('contract.verification.title') },
{
key: 'holders',
content: t('tokens.holdersCount'),
Expand Down Expand Up @@ -60,6 +62,16 @@ export const TokenList = (props: TokensProps) => {
),
key: 'contactAddress',
},
{
key: 'verification',
content: (
<DelayedContractVerificationInfo
scope={token}
contractOasisAddress={token.contract_addr}
noLink
/>
),
},
{
content: token.num_holders.toLocaleString(),
key: 'holdersCount',
Expand Down

0 comments on commit 586240e

Please sign in to comment.