fixing eslint errors
This commit is contained in:
parent
60ba580308
commit
a27b4a3a47
|
@ -89,7 +89,6 @@ const CheckOwner = ({
|
|||
</Button>
|
||||
<Button
|
||||
type="submit"
|
||||
className={classes.button}
|
||||
variant="contained"
|
||||
minWidth={140}
|
||||
color="primary"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// @flow
|
||||
import {
|
||||
lg, md, sm, background,
|
||||
lg, md, sm,
|
||||
} from '~/theme/variables'
|
||||
|
||||
export const styles = () => ({
|
||||
|
|
|
@ -10,13 +10,10 @@ import Identicon from '~/components/Identicon'
|
|||
import Link from '~/components/layout/Link'
|
||||
import Paragraph from '~/components/layout/Paragraph'
|
||||
import Row from '~/components/layout/Row'
|
||||
import GnoForm from '~/components/forms/GnoForm'
|
||||
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 type { Owner } from '~/routes/safe/store/models/owner'
|
||||
import { getEtherScanLink } from '~/logic/wallets/getWeb3'
|
||||
import { secondary } from '~/theme/variables'
|
||||
|
@ -68,7 +65,7 @@ const ReviewRemoveOwner = ({
|
|||
</IconButton>
|
||||
</Row>
|
||||
<Hairline />
|
||||
<Block className={classes.formContainer}>
|
||||
<Block>
|
||||
<Row className={classes.root}>
|
||||
<Col xs={4} layout="column">
|
||||
<Block className={classes.details}>
|
||||
|
@ -90,7 +87,13 @@ const ReviewRemoveOwner = ({
|
|||
Any transaction requires the confirmation of:
|
||||
</Paragraph>
|
||||
<Paragraph size="lg" color="primary" noMargin weight="bolder" className={classes.name}>
|
||||
{values.threshold} out of {owners.size - 1} owner(s)
|
||||
{values.threshold}
|
||||
{' '}
|
||||
out of
|
||||
{' '}
|
||||
{owners.size - 1}
|
||||
{' '}
|
||||
owner(s)
|
||||
</Paragraph>
|
||||
</Block>
|
||||
</Block>
|
||||
|
@ -98,11 +101,14 @@ const ReviewRemoveOwner = ({
|
|||
<Col xs={8} layout="column" className={classes.owners}>
|
||||
<Row className={classes.ownersTitle}>
|
||||
<Paragraph size="lg" color="primary" noMargin>
|
||||
{owners.size - 1} Safe owner(s)
|
||||
{owners.size - 1}
|
||||
{' '}
|
||||
Safe owner(s)
|
||||
</Paragraph>
|
||||
</Row>
|
||||
<Hairline />
|
||||
{owners.map(owner => owner.get('address') != ownerAddress && (
|
||||
{owners.map(
|
||||
owner => owner.address !== ownerAddress && (
|
||||
<React.Fragment key={owner.get('address')}>
|
||||
<Row className={classes.owner}>
|
||||
<Col xs={1} align="center">
|
||||
|
@ -117,7 +123,11 @@ const ReviewRemoveOwner = ({
|
|||
<Paragraph size="md" color="disabled" noMargin>
|
||||
{owner.get('address')}
|
||||
</Paragraph>
|
||||
<Link className={classes.open} to={getEtherScanLink(owner.get('address'), network)} target="_blank">
|
||||
<Link
|
||||
className={classes.open}
|
||||
to={getEtherScanLink(owner.get('address'), network)}
|
||||
target="_blank"
|
||||
>
|
||||
<OpenInNew style={openIconStyle} />
|
||||
</Link>
|
||||
</Block>
|
||||
|
@ -126,7 +136,8 @@ const ReviewRemoveOwner = ({
|
|||
</Row>
|
||||
<Hairline />
|
||||
</React.Fragment>
|
||||
))}
|
||||
),
|
||||
)}
|
||||
<Row className={classes.info} align="center">
|
||||
<Paragraph weight="bolder" noMargin color="primary" size="md">
|
||||
REMOVING OWNER ↓
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// @flow
|
||||
import {
|
||||
lg, md, sm, border, background,
|
||||
lg, sm, border, background,
|
||||
} from '~/theme/variables'
|
||||
|
||||
export const styles = () => ({
|
||||
|
|
|
@ -3,9 +3,9 @@ import React from 'react'
|
|||
import { List } from 'immutable'
|
||||
import { withStyles } from '@material-ui/core/styles'
|
||||
import Close from '@material-ui/icons/Close'
|
||||
import MenuItem from '@material-ui/core/MenuItem'
|
||||
import IconButton from '@material-ui/core/IconButton'
|
||||
import SelectField from '~/components/forms/SelectField'
|
||||
import MenuItem from '@material-ui/core/MenuItem'
|
||||
import Paragraph from '~/components/layout/Paragraph'
|
||||
import Row from '~/components/layout/Row'
|
||||
import GnoForm from '~/components/forms/GnoForm'
|
||||
|
@ -14,14 +14,9 @@ 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 type { Owner } from '~/routes/safe/store/models/owner'
|
||||
import {
|
||||
composeValidators,
|
||||
required,
|
||||
minValue,
|
||||
maxValue,
|
||||
mustBeInteger,
|
||||
composeValidators, required, minValue, maxValue, mustBeInteger,
|
||||
} from '~/components/forms/validator'
|
||||
import { styles } from './style'
|
||||
|
||||
|
@ -35,12 +30,7 @@ type Props = {
|
|||
}
|
||||
|
||||
const ThresholdForm = ({
|
||||
classes,
|
||||
onClose,
|
||||
owners,
|
||||
threshold,
|
||||
onClickBack,
|
||||
onSubmit,
|
||||
classes, onClose, owners, threshold, onClickBack, onSubmit,
|
||||
}: Props) => {
|
||||
const handleSubmit = (values) => {
|
||||
onSubmit(values)
|
||||
|
@ -59,9 +49,8 @@ const ThresholdForm = ({
|
|||
</IconButton>
|
||||
</Row>
|
||||
<Hairline />
|
||||
<GnoForm onSubmit={handleSubmit} initialValues={{threshold: defaultThreshold.toString()}}>
|
||||
{(...args) => {
|
||||
const formState = args[2]
|
||||
<GnoForm onSubmit={handleSubmit} initialValues={{ threshold: defaultThreshold.toString() }}>
|
||||
{() => {
|
||||
const numOptions = owners.size > 1 ? owners.size - 1 : 1
|
||||
|
||||
return (
|
||||
|
@ -80,7 +69,7 @@ const ThresholdForm = ({
|
|||
<Row margin="xl" align="center" className={classes.inputRow}>
|
||||
<Col xs={2}>
|
||||
<Field
|
||||
name={"threshold"}
|
||||
name="threshold"
|
||||
render={props => (
|
||||
<React.Fragment>
|
||||
<SelectField {...props} disableError>
|
||||
|
@ -107,7 +96,7 @@ const ThresholdForm = ({
|
|||
{' '}
|
||||
{owners.size - 1}
|
||||
{' '}
|
||||
owner(s)
|
||||
owner(s)
|
||||
</Paragraph>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
Loading…
Reference in New Issue