make owner address a link in expanded tx view
This commit is contained in:
parent
c56847d427
commit
da45a784b3
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React, { useState } from 'react'
|
import React from 'react'
|
||||||
import { List } from 'immutable'
|
import { List } from 'immutable'
|
||||||
import { withStyles } from '@material-ui/core/styles'
|
import { withStyles } from '@material-ui/core/styles'
|
||||||
import OpenInNew from '@material-ui/icons/OpenInNew'
|
import OpenInNew from '@material-ui/icons/OpenInNew'
|
||||||
|
@ -7,18 +7,10 @@ import MuiList from '@material-ui/core/List'
|
||||||
import ListItem from '@material-ui/core/ListItem'
|
import ListItem from '@material-ui/core/ListItem'
|
||||||
import ListItemIcon from '@material-ui/core/ListItemIcon'
|
import ListItemIcon from '@material-ui/core/ListItemIcon'
|
||||||
import ListItemText from '@material-ui/core/ListItemText'
|
import ListItemText from '@material-ui/core/ListItemText'
|
||||||
import Tab from '@material-ui/core/Tab'
|
|
||||||
import Row from '~/components/layout/Row'
|
|
||||||
import Block from '~/components/layout/Block'
|
|
||||||
import Col from '~/components/layout/Col'
|
|
||||||
import Bold from '~/components/layout/Bold'
|
|
||||||
import Span from '~/components/layout/Span'
|
|
||||||
import Paragraph from '~/components/layout/Paragraph'
|
|
||||||
import Hairline from '~/components/layout/Hairline'
|
|
||||||
import Identicon from '~/components/Identicon'
|
import Identicon from '~/components/Identicon'
|
||||||
import { type Owner } from '~/routes/safe/store/models/owner'
|
import { type Owner } from '~/routes/safe/store/models/owner'
|
||||||
import { openTxInEtherScan } from '~/logic/wallets/getWeb3'
|
import { getEtherScanLink } from '~/logic/wallets/getWeb3'
|
||||||
import { shortVersionOf } from '~/logic/wallets/ethAddresses'
|
import { secondary } from '~/theme/variables'
|
||||||
import { styles } from './style'
|
import { styles } from './style'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
@ -26,6 +18,11 @@ type Props = {
|
||||||
classes: Object,
|
classes: Object,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const openIconStyle = {
|
||||||
|
height: '13px',
|
||||||
|
color: secondary,
|
||||||
|
}
|
||||||
|
|
||||||
const OwnersList = ({ owners, classes }: Props) => (
|
const OwnersList = ({ owners, classes }: Props) => (
|
||||||
<MuiList className={classes.ownersList}>
|
<MuiList className={classes.ownersList}>
|
||||||
{owners.map(owner => (
|
{owners.map(owner => (
|
||||||
|
@ -33,7 +30,16 @@ const OwnersList = ({ owners, classes }: Props) => (
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<Identicon address={owner.address} diameter={32} className={classes.icon} />
|
<Identicon address={owner.address} diameter={32} className={classes.icon} />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText primary={owner.name} secondary={owner.address} />
|
<ListItemText
|
||||||
|
primary={owner.name}
|
||||||
|
secondary={(
|
||||||
|
<a href={getEtherScanLink(owner.address, 'rinkeby')} target="_blank" rel="noopener noreferrer">
|
||||||
|
{owner.address}
|
||||||
|
{' '}
|
||||||
|
<OpenInNew style={openIconStyle} />
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
))}
|
))}
|
||||||
</MuiList>
|
</MuiList>
|
||||||
|
|
Loading…
Reference in New Issue