Skip to content

Commit 59edd4e

Browse files
authored
Merge pull request #2259 from oasisprotocol/mz/mobileContractBadge
Fix mobile contract badge in tokens list
2 parents 4172618 + a71ad4d commit 59edd4e

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

.changelog/2259.bugfix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix mobile contract badge in tokens list

src/app/components/ContractVerificationIcon/index.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { SearchScope } from '../../../types/searchScope'
77
import * as externalLinks from '../../utils/externalLinks'
88
import { isLocalnet } from '../../utils/route-utils'
99
import { AbiPlaygroundLink } from './AbiPlaygroundLink'
10-
import Tooltip from '@mui/material/Tooltip'
1110
import { Badge } from '@oasisprotocol/ui-library/src/components/badge'
1211

1312
export const verificationIconBoxHeight = 28
@@ -17,8 +16,7 @@ export const VerificationIcon: FC<{
1716
scope: SearchScope
1817
verificationLevel?: 'full' | 'partial'
1918
hideLink?: boolean
20-
hideLabel?: boolean
21-
}> = ({ address_eth, scope, verificationLevel, hideLink, hideLabel }) => {
19+
}> = ({ address_eth, scope, verificationLevel, hideLink }) => {
2220
const { t } = useTranslation()
2321
const [explainDelay, setExplainDelay] = useState(false)
2422
if (isLocalnet(scope.network)) {
@@ -42,11 +40,9 @@ export const VerificationIcon: FC<{
4240
}
4341
return (
4442
<>
45-
<Tooltip placement="top" arrow title={hideLabel ? label : undefined}>
46-
<Link {...sourcifyLinkProps}>
47-
<Badge variant={statusVariant}>{hideLabel ? '' : label}</Badge>
48-
</Link>
49-
</Tooltip>
43+
<Link {...sourcifyLinkProps}>
44+
<Badge variant={statusVariant}>{label}</Badge>
45+
</Link>
5046
{!hideLink &&
5147
(verificationLevel ? (
5248
<Typography component="span" sx={{ fontSize: '12px', color: COLORS.brandExtraDark }}>

src/app/components/Tokens/TokenList.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { CopyToClipboard } from '../CopyToClipboard'
88
import { VerificationIcon } from '../ContractVerificationIcon'
99
import { FC } from 'react'
1010
import { RoundedBalance } from '../RoundedBalance'
11-
import { useScreenSize } from 'app/hooks/useScreensize'
1211
import { Badge } from '@oasisprotocol/ui-library/src/components/badge'
1312

1413
type TokensProps = {
@@ -41,7 +40,6 @@ export const TokenTypeTag: FC<{ tokenType: EvmTokenType | undefined }> = ({ toke
4140
export const TokenList = (props: TokensProps) => {
4241
const { isLoading, tokens, pagination, limit } = props
4342
const { t } = useTranslation()
44-
const { isMobile } = useScreenSize()
4543
const tableColumns: TableColProps[] = [
4644
{ key: 'index', content: '' },
4745
{ key: 'name', content: t('common.name') },
@@ -50,7 +48,7 @@ export const TokenList = (props: TokensProps) => {
5048
{ key: 'contract', content: t('common.smartContract') },
5149
{
5250
key: 'verification',
53-
content: isMobile ? t('contract.verification.sourceShort') : t('contract.verification.source'),
51+
content: t('contract.verification.source'),
5452
},
5553
{
5654
key: 'holders',
@@ -115,7 +113,6 @@ export const TokenList = (props: TokensProps) => {
115113
scope={token}
116114
verificationLevel={token.verification_level}
117115
hideLink
118-
hideLabel={isMobile}
119116
/>
120117
),
121118
},

src/locales/en/translation.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@
191191
"openInAbiPlayground": "Interact in <AbiPlaygroundLink>ABI Playground</AbiPlaygroundLink>",
192192
"openInSourcify": "Open in <SourcifyLink>Sourcify</SourcifyLink>",
193193
"source": "Source",
194-
"sourceShort": "Src",
195194
"verifyInSourcify": "Verify through <SourcifyLink>Sourcify</SourcifyLink>",
196195
"explainVerificationDelay": "If you have just verified a contract, it should take a few minutes to update here.",
197196
"proxyERC1167": "ERC-1167 proxy to"

0 commit comments

Comments
 (0)