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