Refactor imports
This commit is contained in:
parent
cf8427b89a
commit
905de7afab
|
@ -4,7 +4,7 @@ import { List } from 'immutable'
|
|||
import { SharedSnackbarConsumer } from '~/components/SharedSnackBar'
|
||||
import Modal from '~/components/Modal'
|
||||
import { type Safe } from '~/routes/safe/store/models/safe'
|
||||
import { type Owner, makeOwner } from '~/routes/safe/store/models/owner'
|
||||
import { type Owner } from '~/routes/safe/store/models/owner'
|
||||
import { setOwners } from '~/logic/safe/utils'
|
||||
import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts'
|
||||
import CheckOwner from './screens/CheckOwner'
|
||||
|
|
|
@ -11,19 +11,10 @@ import Col from '~/components/layout/Col'
|
|||
import Button from '~/components/layout/Button'
|
||||
import Block from '~/components/layout/Block'
|
||||
import Hairline from '~/components/layout/Hairline'
|
||||
import Field from '~/components/forms/Field'
|
||||
import TextField from '~/components/forms/TextField'
|
||||
import Link from '~/components/layout/Link'
|
||||
import Identicon from '~/components/Identicon'
|
||||
import OpenInNew from '@material-ui/icons/OpenInNew'
|
||||
import { getEtherScanLink } from '~/logic/wallets/getWeb3'
|
||||
import {
|
||||
composeValidators,
|
||||
required,
|
||||
mustBeEthereumAddress,
|
||||
minMaxLength,
|
||||
noErrorsOn,
|
||||
} from '~/components/forms/validator'
|
||||
import { styles } from './style'
|
||||
import { secondary } from '~/theme/variables'
|
||||
|
||||
|
@ -65,59 +56,49 @@ const CheckOwner = ({
|
|||
</IconButton>
|
||||
</Row>
|
||||
<Hairline />
|
||||
<GnoForm onSubmit={handleSubmit}>
|
||||
{(...args) => {
|
||||
const formState = args[2]
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Block className={classes.formContainer}>
|
||||
<Row margin="md">
|
||||
<Paragraph>
|
||||
Review the owner you want to remove from the active Safe:
|
||||
</Paragraph>
|
||||
</Row>
|
||||
<Row className={classes.owner}>
|
||||
<Col xs={1} align="center">
|
||||
<Identicon address={ownerAddress} diameter={32} />
|
||||
</Col>
|
||||
<Col xs={7}>
|
||||
<Block className={classNames(classes.name, classes.userName)}>
|
||||
<Paragraph size="lg" noMargin weight="bolder">
|
||||
{ownerName}
|
||||
</Paragraph>
|
||||
<Block align="center" className={classes.user}>
|
||||
<Paragraph size="md" color="disabled" noMargin>
|
||||
{ownerAddress}
|
||||
</Paragraph>
|
||||
<Link className={classes.open} to={getEtherScanLink(ownerAddress, network)} target="_blank">
|
||||
<OpenInNew style={openIconStyle} />
|
||||
</Link>
|
||||
</Block>
|
||||
</Block>
|
||||
</Col>
|
||||
</Row>
|
||||
<Block className={classes.formContainer}>
|
||||
<Row margin="md">
|
||||
<Paragraph>
|
||||
Review the owner you want to remove from the active Safe:
|
||||
</Paragraph>
|
||||
</Row>
|
||||
<Row className={classes.owner}>
|
||||
<Col xs={1} align="center">
|
||||
<Identicon address={ownerAddress} diameter={32} />
|
||||
</Col>
|
||||
<Col xs={7}>
|
||||
<Block className={classNames(classes.name, classes.userName)}>
|
||||
<Paragraph size="lg" noMargin weight="bolder">
|
||||
{ownerName}
|
||||
</Paragraph>
|
||||
<Block align="center" className={classes.user}>
|
||||
<Paragraph size="md" color="disabled" noMargin>
|
||||
{ownerAddress}
|
||||
</Paragraph>
|
||||
<Link className={classes.open} to={getEtherScanLink(ownerAddress, network)} target="_blank">
|
||||
<OpenInNew style={openIconStyle} />
|
||||
</Link>
|
||||
</Block>
|
||||
<Hairline />
|
||||
<Row align="center" className={classes.buttonRow}>
|
||||
<Button className={classes.button} minWidth={140} onClick={onClose}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
type="submit"
|
||||
className={classes.button}
|
||||
variant="contained"
|
||||
minWidth={140}
|
||||
color="primary"
|
||||
data-testid="review-tx-btn"
|
||||
>
|
||||
Next
|
||||
</Button>
|
||||
</Row>
|
||||
</React.Fragment>
|
||||
)
|
||||
}}
|
||||
</GnoForm>
|
||||
</Block>
|
||||
</Col>
|
||||
</Row>
|
||||
</Block>
|
||||
<Hairline />
|
||||
<Row align="center" className={classes.buttonRow}>
|
||||
<Button className={classes.button} minWidth={140} onClick={onClose}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
type="submit"
|
||||
className={classes.button}
|
||||
variant="contained"
|
||||
minWidth={140}
|
||||
color="primary"
|
||||
data-testid="review-tx-btn"
|
||||
>
|
||||
Next
|
||||
</Button>
|
||||
</Row>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -35,4 +35,10 @@ export const styles = () => ({
|
|||
user: {
|
||||
justifyContent: 'left',
|
||||
},
|
||||
userName: {
|
||||
whiteSpace: 'nowrap',
|
||||
},
|
||||
name: {
|
||||
marginRight: `${sm}`,
|
||||
},
|
||||
})
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
// @flow
|
||||
import React from 'react'
|
||||
import classNames from 'classnames'
|
||||
import { List } from 'immutable'
|
||||
import { withStyles } from '@material-ui/core/styles'
|
||||
import Identicon from '~/components/Identicon'
|
||||
import Block from '~/components/layout/Block'
|
||||
import Col from '~/components/layout/Col'
|
||||
import Field from '~/components/forms/Field'
|
||||
import {
|
||||
composeValidators, required, minMaxLength,
|
||||
} from '~/components/forms/validator'
|
||||
import Table from '~/components/Table'
|
||||
import { type Column, cellWidth } from '~/components/Table/TableHead'
|
||||
import TableRow from '@material-ui/core/TableRow'
|
||||
import TableCell from '@material-ui/core/TableCell'
|
||||
import TextField from '~/components/forms/TextField'
|
||||
import Row from '~/components/layout/Row'
|
||||
import Paragraph from '~/components/layout/Paragraph'
|
||||
import Hairline from '~/components/layout/Hairline'
|
||||
|
@ -50,6 +43,7 @@ type Props = {
|
|||
safeName: string,
|
||||
owners: List<Owner>,
|
||||
network: string,
|
||||
threshold: number,
|
||||
userAddress: string,
|
||||
createTransaction: Function,
|
||||
}
|
||||
|
@ -129,9 +123,24 @@ class ManageOwners extends React.Component<Props, State> {
|
|||
))}
|
||||
<TableCell component="td">
|
||||
<Row align="end" className={classes.actions}>
|
||||
<img className={classes.editOwnerIcon} src={RenameOwnerIcon} onClick={this.onShow('EditOwner', row)} />
|
||||
<img className={classes.replaceOwnerIcon} src={ReplaceOwnerIcon} onClick={this.onShow('ReplaceOwner', row)} />
|
||||
<img className={classes.removeOwnerIcon} src={RemoveOwnerIcon} onClick={this.onShow('RemoveOwner', row)} />
|
||||
<img
|
||||
alt="Edit owner"
|
||||
className={classes.editOwnerIcon}
|
||||
src={RenameOwnerIcon}
|
||||
onClick={this.onShow('EditOwner', row)}
|
||||
/>
|
||||
<img
|
||||
alt="Replace owner"
|
||||
className={classes.replaceOwnerIcon}
|
||||
src={ReplaceOwnerIcon}
|
||||
onClick={this.onShow('ReplaceOwner', row)}
|
||||
/>
|
||||
<img
|
||||
alt="Remove owner"
|
||||
className={classes.removeOwnerIcon}
|
||||
src={RemoveOwnerIcon}
|
||||
onClick={this.onShow('RemoveOwner', row)}
|
||||
/>
|
||||
</Row>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
|
Loading…
Reference in New Issue