Replace AddressInfo by EthHashInfo

This commit is contained in:
nicosampler 2020-08-04 15:29:29 -03:00
parent 7f3a99b7f1
commit a21de8be18
6 changed files with 22 additions and 28 deletions

View File

@ -3,7 +3,7 @@ import Dot from '@material-ui/icons/FiberManualRecord'
import classNames from 'classnames'
import * as React from 'react'
import { Identicon } from '@gnosis.pm/safe-react-components'
import { AddressInfo } from '@gnosis.pm/safe-react-components'
import { EthHashInfo } from '@gnosis.pm/safe-react-components'
import CircleDot from 'src/components/Header/components/CircleDot'
import Spacer from 'src/components/Spacer'
@ -105,7 +105,7 @@ const UserDetails = ({ classes, connected, network, onDisconnect, openDashboard,
</Row>
<Block className={classes.user} justify="center">
{userAddress ? (
<AddressInfo address={userAddress} showCopyBtn showEtherscanBtn shortenAddress={4} network={network} />
<EthHashInfo hash={userAddress} showCopyBtn showEtherscanBtn shortenHash={4} network={network} />
) : (
'Address not available'
)}

View File

@ -1,6 +1,6 @@
import { makeStyles } from '@material-ui/core/styles'
import * as React from 'react'
import { AddressInfo, Text } from '@gnosis.pm/safe-react-components'
import { EthHashInfo, Text } from '@gnosis.pm/safe-react-components'
import NetworkLabel from '../NetworkLabel'
import CircleDot from 'src/components/Header/components/CircleDot'
@ -86,9 +86,9 @@ const ProviderInfo = ({ connected, provider, userAddress, network }: ProviderInf
</Paragraph>
<div className={classes.providerContainer}>
{connected ? (
<AddressInfo
address={userAddress}
shortenAddress={4}
<EthHashInfo
hash={userAddress}
shortenHash={4}
showIdenticon
identiconSize="xs"
textColor={addressColor}

View File

@ -1,7 +1,7 @@
import MuiList from '@material-ui/core/List'
import ListItem from '@material-ui/core/ListItem'
import { makeStyles } from '@material-ui/core/styles'
import { AddressInfo, Icon, Text, ButtonLink } from '@gnosis.pm/safe-react-components'
import { EthHashInfo, Icon, Text, ButtonLink } from '@gnosis.pm/safe-react-components'
import * as React from 'react'
import styled from 'styled-components'
@ -109,11 +109,11 @@ const SafeList = ({ currentSafe, defaultSafe, onSafeClick, safes, setDefaultSafe
)}
<AddressWrapper>
<AddressInfo
address={safe.address}
<EthHashInfo
hash={safe.address}
name={safe.name}
showIdenticon
shortenAddress={4}
shortenHash={4}
network={getNetwork()}
/>

View File

@ -1,6 +1,6 @@
import { makeStyles } from '@material-ui/core/styles'
import React from 'react'
import { AddressInfo } from '@gnosis.pm/safe-react-components'
import { EthHashInfo } from '@gnosis.pm/safe-react-components'
import { getNetwork } from 'src/config'
import { Transaction } from 'src/routes/safe/store/models/types/transaction'
@ -46,7 +46,7 @@ export const CreationTx = ({ tx }: Props): React.ReactElement => {
<Block align="left" className={classes.txData}>
<Bold className={classes.txHash}>Creator:</Bold>
{tx.creator ? (
<AddressInfo address={tx.creator} shortenAddress={4} showCopyBtn showEtherscanBtn network={getNetwork()} />
<EthHashInfo hash={tx.creator} shortenHash={4} showCopyBtn showEtherscanBtn network={getNetwork()} />
) : (
'n/a'
)}
@ -54,13 +54,7 @@ export const CreationTx = ({ tx }: Props): React.ReactElement => {
<Block align="left" className={classes.txData}>
<Bold className={classes.txHash}>Factory:</Bold>
{tx.factoryAddress ? (
<AddressInfo
address={tx.factoryAddress}
shortenAddress={4}
showCopyBtn
showEtherscanBtn
network={getNetwork()}
/>
<EthHashInfo hash={tx.factoryAddress} shortenHash={4} showCopyBtn showEtherscanBtn network={getNetwork()} />
) : (
'n/a'
)}
@ -68,7 +62,7 @@ export const CreationTx = ({ tx }: Props): React.ReactElement => {
<Block align="left" className={classes.txData}>
<Bold className={classes.txHash}>Mastercopy:</Bold>
{tx.masterCopy ? (
<AddressInfo address={tx.masterCopy} shortenAddress={4} showCopyBtn showEtherscanBtn network={getNetwork()} />
<EthHashInfo hash={tx.masterCopy} shortenHash={4} showCopyBtn showEtherscanBtn network={getNetwork()} />
) : (
'n/a'
)}

View File

@ -2,7 +2,7 @@ import { withStyles } from '@material-ui/core/styles'
import cn from 'classnames'
import React from 'react'
import { useSelector } from 'react-redux'
import { AddressInfo } from '@gnosis.pm/safe-react-components'
import { EthHashInfo } from '@gnosis.pm/safe-react-components'
import { getNetwork } from 'src/config'
import CancelSmallFilledCircle from './assets/cancel-small-filled.svg'
@ -152,10 +152,10 @@ const OwnerComponent = ({
<div className={classes.circleState}>
<Img alt="" src={imgCircle} />
</div>
<AddressInfo
address={owner}
<EthHashInfo
hash={owner}
name={nameInAdbk}
shortenAddress={4}
shortenHash={4}
showIdenticon
showCopyBtn
showEtherscanBtn

View File

@ -2,7 +2,7 @@ import { makeStyles } from '@material-ui/core/styles'
import cn from 'classnames'
import React, { useState } from 'react'
import { useSelector } from 'react-redux'
import { AddressInfo } from '@gnosis.pm/safe-react-components'
import { EthHashInfo } from '@gnosis.pm/safe-react-components'
import ApproveTxModal from './ApproveTxModal'
import OwnersColumn from './OwnersColumn'
@ -67,9 +67,9 @@ const ExpandedTx = ({ cancelTx, tx }: Props): React.ReactElement => {
<div style={{ display: 'flex' }}>
<Bold className={classes.txHash}>Hash:</Bold>
{tx.executionTxHash ? (
<AddressInfo
address={tx.executionTxHash}
shortenAddress={4}
<EthHashInfo
hash={tx.executionTxHash}
shortenHash={4}
showCopyBtn
showEtherscanBtn
network={getNetwork()}