* Replaces old EtherscanBtn with ExplorerButton from safe components * Remove default exports Fix typo un etherscanLink name import * Replaces EtherscanBtn with ExplorerButton * Remove etherscanButton component
This commit is contained in:
parent
26dd60a12f
commit
3fa0b74137
|
@ -1,13 +1,13 @@
|
|||
import React from 'react'
|
||||
import { getNetworkInfo } from 'src/config'
|
||||
import { getExplorerInfo, getNetworkInfo } from 'src/config'
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Bold from 'src/components/layout/Bold'
|
||||
import Paragraph from 'src/components/layout/Paragraph'
|
||||
import { border, xs } from 'src/theme/variables'
|
||||
import styled from 'styled-components'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
const Wrapper = styled.div`
|
||||
display: flex;
|
||||
|
@ -61,7 +61,7 @@ const AddressInfo = ({ ethBalance, safeAddress, safeName }: Props): React.ReactE
|
|||
{safeAddress}
|
||||
</Paragraph>
|
||||
<CopyBtn content={safeAddress} />
|
||||
<EtherscanBtn value={safeAddress} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(safeAddress)} />
|
||||
</div>
|
||||
{ethBalance && (
|
||||
<StyledBlock>
|
||||
|
|
|
@ -5,7 +5,6 @@ import QRCode from 'qrcode.react'
|
|||
import React, { ReactElement } from 'react'
|
||||
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Button from 'src/components/layout/Button'
|
||||
|
@ -15,7 +14,8 @@ import Paragraph from 'src/components/layout/Paragraph'
|
|||
import Row from 'src/components/layout/Row'
|
||||
import { border, fontColor, lg, md, screenSm, secondaryText, sm } from 'src/theme/variables'
|
||||
import { copyToClipboard } from 'src/utils/clipboard'
|
||||
import { getNetworkInfo } from 'src/config'
|
||||
import { getExplorerInfo, getNetworkInfo } from 'src/config'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
const networkInfo = getNetworkInfo()
|
||||
const useStyles = makeStyles(
|
||||
|
@ -126,7 +126,7 @@ const ReceiveModal = ({ onClose, safeAddress, safeName }: Props): ReactElement =
|
|||
{safeAddress}
|
||||
</Paragraph>
|
||||
<CopyBtn content={safeAddress} />
|
||||
<EtherscanBtn value={safeAddress} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(safeAddress)} />
|
||||
</Block>
|
||||
</Col>
|
||||
<Hairline />
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="#B2B5B2" fill-rule="nonzero" d="M17 17v-2a1 1 0 0 1 2 0v2a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2a1 1 0 1 1 0 2H7v10h10z"/>
|
||||
<path fill="#B2B5B2" d="M15.586 7H13a1 1 0 0 1 0-2h5a.997.997 0 0 1 1 1v5a1 1 0 0 1-2 0V8.414l-6.243 6.243a1 1 0 1 1-1.414-1.414L15.586 7z"/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 442 B |
|
@ -1,59 +0,0 @@
|
|||
import Tooltip from '@material-ui/core/Tooltip'
|
||||
import { makeStyles } from '@material-ui/core/styles'
|
||||
import cn from 'classnames'
|
||||
import React from 'react'
|
||||
|
||||
import EtherscanOpenIcon from './img/etherscan-open.svg'
|
||||
|
||||
import Img from 'src/components/layout/Img'
|
||||
import { xs } from 'src/theme/variables'
|
||||
import { getExplorerInfo } from 'src/config'
|
||||
|
||||
const useStyles = makeStyles({
|
||||
container: {
|
||||
alignItems: 'center',
|
||||
borderRadius: '50%',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
margin: `0 ${xs}`,
|
||||
padding: '0',
|
||||
transition: 'background-color .2s ease-in-out',
|
||||
'&:hover': {
|
||||
backgroundColor: '#F0EFEE',
|
||||
},
|
||||
},
|
||||
increasedPopperZindex: {
|
||||
zIndex: 2001,
|
||||
},
|
||||
})
|
||||
|
||||
interface EtherscanBtnProps {
|
||||
className?: string
|
||||
increaseZindex?: boolean
|
||||
value: string
|
||||
}
|
||||
|
||||
const EtherscanBtn = ({ className = '', increaseZindex = false, value }: EtherscanBtnProps): React.ReactElement => {
|
||||
const classes = useStyles()
|
||||
const customClasses = increaseZindex ? { popper: classes.increasedPopperZindex } : {}
|
||||
|
||||
const explorerInfo = getExplorerInfo(value)
|
||||
const { url } = explorerInfo()
|
||||
|
||||
return (
|
||||
<Tooltip classes={customClasses} placement="top" title="Show details on Etherscan">
|
||||
<a
|
||||
aria-label="Show details on Etherscan"
|
||||
className={cn(classes.container, className)}
|
||||
onClick={(event) => event.stopPropagation()}
|
||||
href={url}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<Img alt="Show on Etherscan" height={20} src={EtherscanOpenIcon} />
|
||||
</a>
|
||||
</Tooltip>
|
||||
)
|
||||
}
|
||||
|
||||
export default EtherscanBtn
|
|
@ -5,11 +5,12 @@ import React from 'react'
|
|||
import { styles } from './style'
|
||||
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Span from 'src/components/layout/Span'
|
||||
import { shortVersionOf } from 'src/logic/wallets/ethAddresses'
|
||||
import EllipsisTransactionDetails from 'src/routes/safe/components/AddressBook/EllipsisTransactionDetails'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
import { getExplorerInfo } from 'src/config'
|
||||
|
||||
const useStyles = makeStyles(styles)
|
||||
|
||||
|
@ -20,7 +21,7 @@ interface EtherscanLinkProps {
|
|||
value: string
|
||||
}
|
||||
|
||||
const EtherscanLink = ({ className, cut, knownAddress, value }: EtherscanLinkProps): React.ReactElement => {
|
||||
export const EtherscanLink = ({ className, cut, knownAddress, value }: EtherscanLinkProps): React.ReactElement => {
|
||||
const classes = useStyles()
|
||||
|
||||
return (
|
||||
|
@ -29,10 +30,8 @@ const EtherscanLink = ({ className, cut, knownAddress, value }: EtherscanLinkPro
|
|||
{cut ? shortVersionOf(value, cut) : value}
|
||||
</Span>
|
||||
<CopyBtn className={cn(classes.button, classes.firstButton)} content={value} />
|
||||
<EtherscanBtn className={classes.button} value={value} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(value)} />
|
||||
{knownAddress !== undefined ? <EllipsisTransactionDetails address={value} knownAddress={knownAddress} /> : null}
|
||||
</Block>
|
||||
)
|
||||
}
|
||||
|
||||
export default EtherscanLink
|
||||
|
|
|
@ -5,7 +5,6 @@ import React, { useEffect, useState } from 'react'
|
|||
import { useSelector } from 'react-redux'
|
||||
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Field from 'src/components/forms/Field'
|
||||
import TextField from 'src/components/forms/TextField'
|
||||
import { composeValidators, minMaxLength, required } from 'src/components/forms/validator'
|
||||
|
@ -24,6 +23,8 @@ import { getGnosisSafeInstanceAt } from 'src/logic/contracts/safeContracts'
|
|||
import { FIELD_LOAD_ADDRESS, THRESHOLD } from 'src/routes/load/components/fields'
|
||||
import { getOwnerAddressBy, getOwnerNameBy } from 'src/routes/open/components/fields'
|
||||
import { styles } from './styles'
|
||||
import { getExplorerInfo } from 'src/config'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
const calculateSafeValues = (owners, threshold, values) => {
|
||||
const initialValues = { ...values }
|
||||
|
@ -112,7 +113,7 @@ const OwnerListComponent = (props) => {
|
|||
{address}
|
||||
</Paragraph>
|
||||
<CopyBtn content={address} />
|
||||
<EtherscanBtn value={address} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(address)} />
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
|
@ -3,7 +3,6 @@ import classNames from 'classnames'
|
|||
import React from 'react'
|
||||
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Col from 'src/components/layout/Col'
|
||||
|
@ -16,6 +15,8 @@ import { FIELD_LOAD_ADDRESS, FIELD_LOAD_NAME, THRESHOLD } from 'src/routes/load/
|
|||
import { getNumOwnersFrom, getOwnerAddressBy, getOwnerNameBy } from 'src/routes/open/components/fields'
|
||||
import { getAccountsFrom } from 'src/routes/open/utils/safeDataExtractor'
|
||||
import { useStyles } from './styles'
|
||||
import { getExplorerInfo } from 'src/config'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
const checkIfUserAddressIsAnOwner = (values: Record<string, string>, userAddress: string): boolean => {
|
||||
let isOwner = false
|
||||
|
@ -76,7 +77,7 @@ const ReviewComponent = ({ userAddress, values }: Props): React.ReactElement =>
|
|||
{shortVersionOf(safeAddress, 4)}
|
||||
</Paragraph>
|
||||
<CopyBtn content={safeAddress} />
|
||||
<EtherscanBtn value={safeAddress} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(safeAddress)} />
|
||||
</Row>
|
||||
</Block>
|
||||
<Block margin="lg">
|
||||
|
@ -121,7 +122,7 @@ const ReviewComponent = ({ userAddress, values }: Props): React.ReactElement =>
|
|||
{address}
|
||||
</Paragraph>
|
||||
<CopyBtn content={address} />
|
||||
<EtherscanBtn value={address} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(address)} />
|
||||
</Block>
|
||||
</Block>
|
||||
</Col>
|
||||
|
|
|
@ -2,9 +2,8 @@ import TableContainer from '@material-ui/core/TableContainer'
|
|||
import classNames from 'classnames'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { fromTokenUnit } from 'src/logic/tokens/utils/humanReadableValue'
|
||||
import { getNetworkInfo } from 'src/config'
|
||||
import { getExplorerInfo, getNetworkInfo } from 'src/config'
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Col from 'src/components/layout/Col'
|
||||
|
@ -18,6 +17,7 @@ import { getAccountsFrom, getNamesFrom } from 'src/routes/open/utils/safeDataExt
|
|||
|
||||
import { FIELD_CONFIRMATIONS, FIELD_NAME, getNumOwnersFrom } from '../fields'
|
||||
import { useStyles } from './styles'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
type ReviewComponentProps = {
|
||||
userAccount: string
|
||||
|
@ -118,7 +118,7 @@ const ReviewComponent = ({ userAccount, values }: ReviewComponentProps) => {
|
|||
{addresses[index]}
|
||||
</Paragraph>
|
||||
<CopyBtn content={addresses[index]} />
|
||||
<EtherscanBtn value={addresses[index]} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(addresses[index])} />
|
||||
</Block>
|
||||
</Block>
|
||||
</Col>
|
||||
|
|
|
@ -4,10 +4,9 @@ import IconButton from '@material-ui/core/IconButton'
|
|||
import { makeStyles } from '@material-ui/core/styles'
|
||||
import Close from '@material-ui/icons/Close'
|
||||
|
||||
import { getNetworkInfo } from 'src/config'
|
||||
import { getExplorerInfo, getNetworkInfo } from 'src/config'
|
||||
import { fromTokenUnit, toTokenUnit } from 'src/logic/tokens/utils/humanReadableValue'
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Button from 'src/components/layout/Button'
|
||||
|
@ -29,6 +28,7 @@ import { sm } from 'src/theme/variables'
|
|||
import ArrowDown from '../../assets/arrow-down.svg'
|
||||
|
||||
import { styles } from './style'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
export type CustomTx = {
|
||||
contractAddress?: string
|
||||
|
@ -132,7 +132,7 @@ const ReviewCustomTx = ({ onClose, onPrev, tx }: Props): React.ReactElement => {
|
|||
{tx.contractAddress}
|
||||
</Paragraph>
|
||||
<CopyBtn content={tx.contractAddress as string} />
|
||||
<EtherscanBtn value={tx.contractAddress as string} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(tx.contractAddress as string)} />
|
||||
</Block>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
|
@ -8,7 +8,6 @@ import Close from '@material-ui/icons/Close'
|
|||
|
||||
import QRIcon from 'src/assets/icons/qrcode.svg'
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Field from 'src/components/forms/Field'
|
||||
import GnoForm from 'src/components/forms/GnoForm'
|
||||
import TextareaField from 'src/components/forms/TextareaField'
|
||||
|
@ -32,7 +31,8 @@ import { sm } from 'src/theme/variables'
|
|||
import ArrowDown from '../../assets/arrow-down.svg'
|
||||
|
||||
import { styles } from './style'
|
||||
import { getNetworkInfo } from 'src/config'
|
||||
import { getExplorerInfo, getNetworkInfo } from 'src/config'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
export interface CreatedTx {
|
||||
contractAddress: string
|
||||
|
@ -184,7 +184,7 @@ const SendCustomTx: React.FC<Props> = ({ initialValues, onClose, onNext, contrac
|
|||
</Paragraph>
|
||||
</Block>
|
||||
<CopyBtn content={selectedEntry.address} />
|
||||
<EtherscanBtn value={selectedEntry.address} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(selectedEntry.address)} />
|
||||
</Block>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
|
@ -5,9 +5,8 @@ import { makeStyles } from '@material-ui/core/styles'
|
|||
import Close from '@material-ui/icons/Close'
|
||||
|
||||
import { fromTokenUnit } from 'src/logic/tokens/utils/humanReadableValue'
|
||||
import { getNetworkInfo } from 'src/config'
|
||||
import { getExplorerInfo, getNetworkInfo } from 'src/config'
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Button from 'src/components/layout/Button'
|
||||
|
@ -32,6 +31,7 @@ import { textShortener } from 'src/utils/strings'
|
|||
import ArrowDown from '../assets/arrow-down.svg'
|
||||
|
||||
import { styles } from './style'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
const { nativeCoin } = getNetworkInfo()
|
||||
|
||||
|
@ -153,7 +153,7 @@ const ReviewCollectible = ({ onClose, onPrev, tx }: Props): React.ReactElement =
|
|||
{tx.recipientAddress}
|
||||
</Paragraph>
|
||||
<CopyBtn content={tx.recipientAddress} />
|
||||
<EtherscanBtn value={tx.recipientAddress} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(tx.recipientAddress)} />
|
||||
</Block>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
|
@ -5,10 +5,9 @@ import { BigNumber } from 'bignumber.js'
|
|||
import React, { useEffect, useMemo, useState } from 'react'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { toTokenUnit, fromTokenUnit } from 'src/logic/tokens/utils/humanReadableValue'
|
||||
import { getNetworkInfo } from 'src/config'
|
||||
import { getExplorerInfo, getNetworkInfo } from 'src/config'
|
||||
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Button from 'src/components/layout/Button'
|
||||
|
@ -32,6 +31,7 @@ import { sm } from 'src/theme/variables'
|
|||
import ArrowDown from '../assets/arrow-down.svg'
|
||||
|
||||
import { styles } from './style'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
const useStyles = makeStyles(styles)
|
||||
|
||||
|
@ -162,7 +162,7 @@ const ReviewTx = ({ onClose, onPrev, tx }: ReviewTxProps): React.ReactElement =>
|
|||
{tx.recipientAddress}
|
||||
</Paragraph>
|
||||
<CopyBtn content={tx.recipientAddress} />
|
||||
<EtherscanBtn value={tx.recipientAddress} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(tx.recipientAddress)} />
|
||||
</Block>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
|
@ -5,7 +5,6 @@ import React, { useState } from 'react'
|
|||
import { useSelector } from 'react-redux'
|
||||
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import GnoForm from 'src/components/forms/GnoForm'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
|
@ -29,6 +28,8 @@ import ArrowDown from '../assets/arrow-down.svg'
|
|||
|
||||
import { styles } from './style'
|
||||
import { NFTToken } from 'src/logic/collectibles/sources/collectibles'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
import { getExplorerInfo } from 'src/config'
|
||||
|
||||
const formMutators = {
|
||||
setMax: (args, state, utils) => {
|
||||
|
@ -187,7 +188,7 @@ const SendCollectible = ({
|
|||
</Paragraph>
|
||||
</Block>
|
||||
<CopyBtn content={selectedEntry.address} />
|
||||
<EtherscanBtn value={selectedEntry.address} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(selectedEntry.address)} />
|
||||
</Block>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
|
@ -2,13 +2,12 @@ import IconButton from '@material-ui/core/IconButton'
|
|||
import InputAdornment from '@material-ui/core/InputAdornment'
|
||||
import { makeStyles } from '@material-ui/core/styles'
|
||||
import Close from '@material-ui/icons/Close'
|
||||
import { getNetworkInfo } from 'src/config'
|
||||
import { getExplorerInfo, getNetworkInfo } from 'src/config'
|
||||
import React, { useState } from 'react'
|
||||
import { OnChange } from 'react-final-form-listeners'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Field from 'src/components/forms/Field'
|
||||
import GnoForm from 'src/components/forms/GnoForm'
|
||||
import TextField from 'src/components/forms/TextField'
|
||||
|
@ -34,6 +33,7 @@ import { sm } from 'src/theme/variables'
|
|||
import ArrowDown from '../assets/arrow-down.svg'
|
||||
|
||||
import { styles } from './style'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
const formMutators = {
|
||||
setMax: (args, state, utils) => {
|
||||
|
@ -189,7 +189,7 @@ const SendFunds = ({
|
|||
</Paragraph>
|
||||
</Block>
|
||||
<CopyBtn content={selectedEntry.address} />
|
||||
<EtherscanBtn value={selectedEntry.address} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(selectedEntry.address)} />
|
||||
</Block>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
|
@ -5,9 +5,8 @@ import classNames from 'classnames'
|
|||
import React, { useEffect, useState } from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { fromTokenUnit } from 'src/logic/tokens/utils/humanReadableValue'
|
||||
import { getNetworkInfo } from 'src/config'
|
||||
import { getExplorerInfo, getNetworkInfo } from 'src/config'
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Button from 'src/components/layout/Button'
|
||||
|
@ -21,6 +20,7 @@ import { estimateTxGasCosts } from 'src/logic/safe/transactions/gas'
|
|||
import { formatAmount } from 'src/logic/tokens/utils/formatAmount'
|
||||
|
||||
import { styles } from './style'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
export const ADD_OWNER_SUBMIT_BTN_TEST_ID = 'add-owner-submit-btn'
|
||||
|
||||
|
@ -118,7 +118,7 @@ const ReviewAddOwner = ({ classes, onClickBack, onClose, onSubmit, values }) =>
|
|||
{owner.address}
|
||||
</Paragraph>
|
||||
<CopyBtn content={owner.address} />
|
||||
<EtherscanBtn value={owner.address} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(owner.address)} />
|
||||
</Block>
|
||||
</Block>
|
||||
</Col>
|
||||
|
@ -146,7 +146,7 @@ const ReviewAddOwner = ({ classes, onClickBack, onClose, onSubmit, values }) =>
|
|||
{values.ownerAddress}
|
||||
</Paragraph>
|
||||
<CopyBtn content={values.ownerAddress} />
|
||||
<EtherscanBtn value={values.ownerAddress} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(values.ownerAddress)} />
|
||||
</Block>
|
||||
</Block>
|
||||
</Col>
|
||||
|
|
|
@ -5,7 +5,6 @@ import React from 'react'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Field from 'src/components/forms/Field'
|
||||
import GnoForm from 'src/components/forms/GnoForm'
|
||||
import TextField from 'src/components/forms/TextField'
|
||||
|
@ -26,6 +25,8 @@ import { safeParamAddressFromStateSelector } from 'src/logic/safe/store/selector
|
|||
import { sm } from 'src/theme/variables'
|
||||
|
||||
import { styles } from './style'
|
||||
import { getExplorerInfo } from 'src/config'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
export const RENAME_OWNER_INPUT_TEST_ID = 'rename-owner-input'
|
||||
export const SAVE_OWNER_CHANGES_BTN_TEST_ID = 'save-owner-changes-btn'
|
||||
|
@ -93,7 +94,7 @@ const EditOwnerComponent = ({ isOpen, onClose, ownerAddress, selectedOwnerName }
|
|||
{ownerAddress}
|
||||
</Paragraph>
|
||||
<CopyBtn content={safeAddress} />
|
||||
<EtherscanBtn value={safeAddress} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(safeAddress)} />
|
||||
</Block>
|
||||
</Row>
|
||||
</Block>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import * as React from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
import EtherScanLink from 'src/components/EtherscanLink'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Paragraph from 'src/components/layout/Paragraph'
|
||||
import { getValidAddressBookName } from 'src/logic/addressBook/utils'
|
||||
import { useWindowDimensions } from 'src/logic/hooks/useWindowDimensions'
|
||||
import { EtherscanLink } from 'src/components/EtherscanLink'
|
||||
|
||||
type OwnerAddressTableCellProps = {
|
||||
address: string
|
||||
|
@ -36,7 +36,7 @@ const OwnerAddressTableCell = (props: OwnerAddressTableCellProps): React.ReactEl
|
|||
{showLinks ? (
|
||||
<div style={{ marginLeft: 10, flexShrink: 1, minWidth: 0 }}>
|
||||
{userName && getValidAddressBookName(userName)}
|
||||
<EtherScanLink knownAddress={knownAddress} value={address} cut={cut} />
|
||||
<EtherscanLink knownAddress={knownAddress} value={address} cut={cut} />
|
||||
</div>
|
||||
) : (
|
||||
<Paragraph style={{ marginLeft: 10 }}>{address}</Paragraph>
|
||||
|
|
|
@ -5,7 +5,6 @@ import classNames from 'classnames/bind'
|
|||
import React from 'react'
|
||||
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Button from 'src/components/layout/Button'
|
||||
|
@ -15,6 +14,8 @@ import Paragraph from 'src/components/layout/Paragraph'
|
|||
import Row from 'src/components/layout/Row'
|
||||
|
||||
import { styles } from './style'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
import { getExplorerInfo } from 'src/config'
|
||||
|
||||
export const REMOVE_OWNER_MODAL_NEXT_BTN_TEST_ID = 'remove-owner-next-btn'
|
||||
|
||||
|
@ -53,7 +54,7 @@ const CheckOwner = ({ classes, onClose, onSubmit, ownerAddress, ownerName }) =>
|
|||
{ownerAddress}
|
||||
</Paragraph>
|
||||
<CopyBtn content={ownerAddress} />
|
||||
<EtherscanBtn value={ownerAddress} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(ownerAddress)} />
|
||||
</Block>
|
||||
</Block>
|
||||
</Col>
|
||||
|
|
|
@ -5,9 +5,8 @@ import classNames from 'classnames'
|
|||
import React, { useEffect, useState } from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { fromTokenUnit } from 'src/logic/tokens/utils/humanReadableValue'
|
||||
import { getNetworkInfo } from 'src/config'
|
||||
import { getExplorerInfo, getNetworkInfo } from 'src/config'
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Button from 'src/components/layout/Button'
|
||||
|
@ -21,6 +20,7 @@ import { estimateTxGasCosts } from 'src/logic/safe/transactions/gas'
|
|||
import { formatAmount } from 'src/logic/tokens/utils/formatAmount'
|
||||
|
||||
import { styles } from './style'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
export const REMOVE_OWNER_REVIEW_BTN_TEST_ID = 'remove-owner-review-btn'
|
||||
|
||||
|
@ -119,7 +119,7 @@ const ReviewRemoveOwner = ({ classes, onClickBack, onClose, onSubmit, ownerAddre
|
|||
{owner.address}
|
||||
</Paragraph>
|
||||
<CopyBtn content={owner.address} />
|
||||
<EtherscanBtn value={owner.address} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(owner.address)} />
|
||||
</Block>
|
||||
</Block>
|
||||
</Col>
|
||||
|
@ -148,7 +148,7 @@ const ReviewRemoveOwner = ({ classes, onClickBack, onClose, onSubmit, ownerAddre
|
|||
{ownerAddress}
|
||||
</Paragraph>
|
||||
<CopyBtn content={ownerAddress} />
|
||||
<EtherscanBtn value={ownerAddress} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(ownerAddress)} />
|
||||
</Block>
|
||||
</Block>
|
||||
</Col>
|
||||
|
|
|
@ -6,7 +6,6 @@ import React from 'react'
|
|||
import { useSelector } from 'react-redux'
|
||||
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import AddressInput from 'src/components/forms/AddressInput'
|
||||
import Field from 'src/components/forms/Field'
|
||||
import GnoForm from 'src/components/forms/GnoForm'
|
||||
|
@ -23,6 +22,8 @@ import { ScanQRWrapper } from 'src/components/ScanQRModal/ScanQRWrapper'
|
|||
import { safeOwnersSelector } from 'src/logic/safe/store/selectors'
|
||||
|
||||
import { styles } from './style'
|
||||
import { getExplorerInfo } from 'src/config'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
export const REPLACE_OWNER_NAME_INPUT_TEST_ID = 'replace-owner-name-input'
|
||||
export const REPLACE_OWNER_ADDRESS_INPUT_TEST_ID = 'replace-owner-address-testid'
|
||||
|
@ -94,7 +95,7 @@ const OwnerForm = ({ classes, onClose, onSubmit, ownerAddress, ownerName }) => {
|
|||
{ownerAddress}
|
||||
</Paragraph>
|
||||
<CopyBtn content={ownerAddress} />
|
||||
<EtherscanBtn value={ownerAddress} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(ownerAddress)} />
|
||||
</Block>
|
||||
</Block>
|
||||
</Col>
|
||||
|
|
|
@ -5,9 +5,8 @@ import classNames from 'classnames'
|
|||
import React, { useEffect, useState } from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { fromTokenUnit } from 'src/logic/tokens/utils/humanReadableValue'
|
||||
import { getNetworkInfo } from 'src/config'
|
||||
import { getExplorerInfo, getNetworkInfo } from 'src/config'
|
||||
import CopyBtn from 'src/components/CopyBtn'
|
||||
import EtherscanBtn from 'src/components/EtherscanBtn'
|
||||
import Identicon from 'src/components/Identicon'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Button from 'src/components/layout/Button'
|
||||
|
@ -26,6 +25,7 @@ import { estimateTxGasCosts } from 'src/logic/safe/transactions/gas'
|
|||
import { formatAmount } from 'src/logic/tokens/utils/formatAmount'
|
||||
|
||||
import { styles } from './style'
|
||||
import { ExplorerButton } from '@gnosis.pm/safe-react-components'
|
||||
|
||||
export const REPLACE_OWNER_SUBMIT_BTN_TEST_ID = 'replace-owner-submit-btn'
|
||||
|
||||
|
@ -124,7 +124,7 @@ const ReviewRemoveOwner = ({ classes, onClickBack, onClose, onSubmit, ownerAddre
|
|||
{owner.address}
|
||||
</Paragraph>
|
||||
<CopyBtn content={owner.address} />
|
||||
<EtherscanBtn value={owner.address} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(owner.address)} />
|
||||
</Block>
|
||||
</Block>
|
||||
</Col>
|
||||
|
@ -153,7 +153,7 @@ const ReviewRemoveOwner = ({ classes, onClickBack, onClose, onSubmit, ownerAddre
|
|||
{ownerAddress}
|
||||
</Paragraph>
|
||||
<CopyBtn content={ownerAddress} />
|
||||
<EtherscanBtn value={ownerAddress} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(ownerAddress)} />
|
||||
</Block>
|
||||
</Block>
|
||||
</Col>
|
||||
|
@ -178,7 +178,7 @@ const ReviewRemoveOwner = ({ classes, onClickBack, onClose, onSubmit, ownerAddre
|
|||
{values.ownerAddress}
|
||||
</Paragraph>
|
||||
<CopyBtn content={values.ownerAddress} />
|
||||
<EtherscanBtn value={values.ownerAddress} />
|
||||
<ExplorerButton explorerUrl={getExplorerInfo(values.ownerAddress)} />
|
||||
</Block>
|
||||
</Block>
|
||||
</Col>
|
||||
|
|
|
@ -2,7 +2,7 @@ import { makeStyles } from '@material-ui/core/styles'
|
|||
import React from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
||||
import EtherscanLink from 'src/components/EtherscanLink'
|
||||
import { EtherscanLink } from 'src/components/EtherscanLink'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Bold from 'src/components/layout/Bold'
|
||||
import { getNameFromAddressBookSelector } from 'src/logic/addressBook/store/selectors'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
import EtherscanLink from 'src/components/EtherscanLink'
|
||||
import { EtherscanLink } from 'src/components/EtherscanLink'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Bold from 'src/components/layout/Bold'
|
||||
import Paragraph from 'src/components/layout/Paragraph'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
import EtherscanLink from 'src/components/EtherscanLink'
|
||||
import { EtherscanLink } from 'src/components/EtherscanLink'
|
||||
import Block from 'src/components/layout/Block'
|
||||
import Bold from 'src/components/layout/Bold'
|
||||
import { getNameFromAddressBookSelector } from 'src/logic/addressBook/store/selectors'
|
||||
|
|
Loading…
Reference in New Issue