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:
parent
8a13d333d2
commit
50995c3f0c
|
@ -17,7 +17,7 @@ interface EtherscanLinkProps {
|
||||||
className?: string
|
className?: string
|
||||||
cut?: number
|
cut?: number
|
||||||
knownAddress?: boolean
|
knownAddress?: boolean
|
||||||
type?: 'tx' | 'address'
|
type: 'tx' | 'address'
|
||||||
value: string
|
value: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,6 @@ const TxInfoDetails = ({ data }: { data: DataDecoded }): React.ReactElement => (
|
||||||
<InlineText size="lg" strong>
|
<InlineText size="lg" strong>
|
||||||
{param.name}({param.type}):
|
{param.name}({param.type}):
|
||||||
</InlineText>
|
</InlineText>
|
||||||
|
|
||||||
<Value method={data.method} type={param.type} value={param.value} />
|
<Value method={data.method} type={param.type} value={param.value} />
|
||||||
</TxDetailsMethodParam>
|
</TxDetailsMethodParam>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -47,13 +47,13 @@ const EtherscanLink = ({ method, type, value }: RenderValueProps): React.ReactEl
|
||||||
return (
|
return (
|
||||||
<NestedWrapper>
|
<NestedWrapper>
|
||||||
{(value as string[]).map((value, index) => (
|
{(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>
|
</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 => {
|
const GenericValue = ({ method, type, value }: RenderValueProps): React.ReactElement => {
|
||||||
|
|
Loading…
Reference in New Issue