Etherscan link broken (#1255)

* Add default type

* update deps

* Rename variables

* Update link

* hardcode link type

* remove optional type prop for etherscanlink

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
This commit is contained in:
Mati Dastugue 2020-08-20 16:15:38 -03:00 committed by GitHub
parent 8a13d333d2
commit 50995c3f0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -17,7 +17,7 @@ interface EtherscanLinkProps {
className?: string
cut?: number
knownAddress?: boolean
type?: 'tx' | 'address'
type: 'tx' | 'address'
value: string
}

View File

@ -59,7 +59,6 @@ const TxInfoDetails = ({ data }: { data: DataDecoded }): React.ReactElement => (
<InlineText size="lg" strong>
{param.name}({param.type}):
</InlineText>
<Value method={data.method} type={param.type} value={param.value} />
</TxDetailsMethodParam>
))}

View File

@ -47,13 +47,13 @@ const EtherscanLink = ({ method, type, value }: RenderValueProps): React.ReactEl
return (
<NestedWrapper>
{(value as string[]).map((value, index) => (
<SafeEtherscanLink key={`${method}-value-${index}`} cut={cut} value={value} />
<SafeEtherscanLink type="address" key={`${method}-value-${index}`} cut={cut} value={value} />
))}
</NestedWrapper>
)
}
return <SafeEtherscanLink className={classes.address} cut={cut} value={value as string} />
return <SafeEtherscanLink type="address" className={classes.address} cut={cut} value={value as string} />
}
const GenericValue = ({ method, type, value }: RenderValueProps): React.ReactElement => {