@@ -14,8 +14,9 @@ export const verificationIconBoxHeight = 28
1414
1515type ContractStatusProps = {
1616 verificationLevel ?: 'full' | 'partial'
17+ hideLabel ?: boolean
1718}
18- export const ContractStatus = ( { verificationLevel } : ContractStatusProps ) => {
19+ export const ContractStatus = ( { verificationLevel, hideLabel } : ContractStatusProps ) => {
1920 const { t } = useTranslation ( )
2021 const statusLabel =
2122 verificationLevel === 'full'
@@ -26,15 +27,18 @@ export const ContractStatus = ({ verificationLevel }: ContractStatusProps) => {
2627 const statusVariant =
2728 verificationLevel === 'full' ? 'success' : verificationLevel === 'partial' ? 'partialsuccess' : 'danger'
2829
29- return < StatusBadge label = { statusLabel } variant = { statusVariant } />
30+ const label = hideLabel ? '' : statusLabel
31+
32+ return < StatusBadge label = { label } variant = { statusVariant } />
3033}
3134
3235export const VerificationIcon : FC < {
3336 address_eth : string
3437 scope : SearchScope
3538 verificationLevel ?: 'full' | 'partial'
3639 noLink ?: boolean
37- } > = ( { address_eth, scope, verificationLevel, noLink = false } ) => {
40+ hideLabel ?: boolean
41+ } > = ( { address_eth, scope, verificationLevel, noLink = false , hideLabel } ) => {
3842 const { t } = useTranslation ( )
3943 const [ explainDelay , setExplainDelay ] = useState ( false )
4044 if ( isLocalnet ( scope . network ) ) {
@@ -49,16 +53,15 @@ export const VerificationIcon: FC<{
4953 }
5054 const Component = noLink ? Box : ( Link as React . ElementType )
5155 const componentProps = noLink ? { } : sourcifyLinkProps
52-
5356 return (
5457 < >
5558 < Component { ...componentProps } >
56- < ContractStatus verificationLevel = { verificationLevel } />
59+ < ContractStatus verificationLevel = { verificationLevel } hideLabel = { hideLabel } />
5760 </ Component >
58-
5961 { ! noLink &&
6062 ( verificationLevel ? (
6163 < Typography component = "span" sx = { { fontSize : '12px' , color : COLORS . brandExtraDark } } >
64+
6265 < Trans
6366 t = { t }
6467 i18nKey = { 'contract.verification.openInSourcify' }
@@ -70,6 +73,7 @@ export const VerificationIcon: FC<{
7073 </ Typography >
7174 ) : (
7275 < Typography component = "span" sx = { { fontSize : '12px' , color : COLORS . brandExtraDark } } >
76+
7377 < Trans
7478 t = { t }
7579 i18nKey = { 'contract.verification.verifyInSourcify' }
0 commit comments