From 905de7afab0a46f028ebf49d010f2b8bf6523030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Tue, 11 Jun 2019 14:09:16 +0200 Subject: [PATCH] Refactor imports --- .../ManageOwners/RemoveOwnerModal/index.jsx | 2 +- .../screens/CheckOwner/index.jsx | 103 +++++++----------- .../screens/OwnerForm/style.js | 6 + .../Settings/ManageOwners/index.jsx | 29 +++-- 4 files changed, 68 insertions(+), 72 deletions(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx index ad37e4db..a0481a76 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/index.jsx @@ -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' diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx index 75d514d1..f9420fe7 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/CheckOwner/index.jsx @@ -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 = ({ - - {(...args) => { - const formState = args[2] - - return ( - - - - - Review the owner you want to remove from the active Safe: - - - - - - - - - - {ownerName} - - - - {ownerAddress} - - - - - - - - + + + + Review the owner you want to remove from the active Safe: + + + + + + + + + + {ownerName} + + + + {ownerAddress} + + + + - - - - - - - ) - }} - + + + + + + + + + ) } diff --git a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/style.js b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/style.js index bb4c1c1f..54952dc1 100644 --- a/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/style.js +++ b/src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/screens/OwnerForm/style.js @@ -35,4 +35,10 @@ export const styles = () => ({ user: { justifyContent: 'left', }, + userName: { + whiteSpace: 'nowrap', + }, + name: { + marginRight: `${sm}`, + }, }) diff --git a/src/routes/safe/components/Settings/ManageOwners/index.jsx b/src/routes/safe/components/Settings/ManageOwners/index.jsx index 1b9bac83..352e51dd 100644 --- a/src/routes/safe/components/Settings/ManageOwners/index.jsx +++ b/src/routes/safe/components/Settings/ManageOwners/index.jsx @@ -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, network: string, + threshold: number, userAddress: string, createTransaction: Function, } @@ -129,9 +123,24 @@ class ManageOwners extends React.Component { ))} - - - + Edit owner + Replace owner + Remove owner