Add network

This commit is contained in:
nicosampler 2020-07-29 16:33:04 -03:00
parent a295747cb6
commit 5cc29d518d
4 changed files with 24 additions and 4 deletions

View File

@ -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} />
<AddressInfo address={userAddress} showCopyBtn showEtherscanBtn shortenAddress={4} network={network} />
) : (
'Address not available'
)}

View File

@ -99,7 +99,13 @@ const ProviderInfo = ({ connected, provider, userAddress, network }: ProviderInf
{connected ? (
<AddressWrapper>
<Identicon address={userAddress || 'random'} size="xs" />
<AddressInfo address={userAddress} shortenAddress={4} textColor={addressColor} textSize="sm" />
<AddressInfo
address={userAddress}
shortenAddress={4}
textColor={addressColor}
textSize="sm"
network={network}
/>
</AddressWrapper>
) : (
<Text size="md" color={addressColor}>

View File

@ -5,6 +5,7 @@ import { AddressInfo, Icon, Text, ButtonLink } from '@gnosis.pm/safe-react-compo
import * as React from 'react'
import styled from 'styled-components'
import { getNetwork } from 'src/config'
import DefaultBadge from './DefaultBadge'
import Hairline from 'src/components/layout/Hairline'
import Link from 'src/components/layout/Link'
@ -97,7 +98,13 @@ const SafeList = ({ currentSafe, defaultSafe, onSafeClick, safes, setDefaultSafe
)}
<AddressWrapper>
<AddressInfo address={safe.address} name={safe.name} showIdenticon shortenAddress={4} />
<AddressInfo
address={safe.address}
name={safe.name}
showIdenticon
shortenAddress={4}
network={getNetwork()}
/>
<AddressDetails>
<Text size="xl">{`${formatAmount(safe.ethBalance)} ETH`}</Text>

View File

@ -10,6 +10,7 @@ import RejectTxModal from './RejectTxModal'
import TxDescription from './TxDescription'
import { styles } from './style'
import { getNetwork } from 'src/config'
import Block from 'src/components/layout/Block'
import Bold from 'src/components/layout/Bold'
import Col from 'src/components/layout/Col'
@ -60,7 +61,13 @@ const ExpandedTx = ({ cancelTx, tx }) => {
<Block align="left" className={classes.txData}>
<Bold className={classes.txHash}>Hash:</Bold>
{tx.executionTxHash ? (
<AddressInfo address={tx.executionTxHash} shortenAddress={4} showCopyBtn showEtherscanBtn />
<AddressInfo
address={tx.executionTxHash}
shortenAddress={4}
showCopyBtn
showEtherscanBtn
network={getNetwork()}
/>
) : (
'n/a'
)}