From 4c3172880ef53315aca084637aa590e83af85a99 Mon Sep 17 00:00:00 2001 From: mmv Date: Thu, 18 Jul 2019 13:35:21 +0400 Subject: [PATCH 01/14] change wording in safe name form --- .../open/components/SafeNameForm/index.jsx | 49 +++++++------------ 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/src/routes/open/components/SafeNameForm/index.jsx b/src/routes/open/components/SafeNameForm/index.jsx index 055a7894..aade39f6 100644 --- a/src/routes/open/components/SafeNameForm/index.jsx +++ b/src/routes/open/components/SafeNameForm/index.jsx @@ -5,7 +5,6 @@ import Field from '~/components/forms/Field' import TextField from '~/components/forms/TextField' import { required } from '~/components/forms/validator' import Block from '~/components/layout/Block' -import Row from '~/components/layout/Row' import { FIELD_NAME } from '~/routes/open/components/fields' import Paragraph from '~/components/layout/Paragraph' import OpenPaper from '~/components/Stepper/OpenPaper' @@ -35,10 +34,25 @@ const styles = () => ({ const SafeName = ({ classes }: Props) => ( + + + You are about to create a new Gnosis Safe wallet with one or more owners. First, let's give your new wallet + a name. This name is only stored locally and will never be shared with Gnosis or any third parties. + + + + + - This setup will create a Safe with one or more owners. Optionally give the Safe a local name. By continuing you - consent with the + By continuing you consent with the {' '} terms of use @@ -49,35 +63,10 @@ const SafeName = ({ classes }: Props) => ( privacy policy - . + . Most importantly, you confirm that your funds are held securely in the Gnosis Safe, a smart contract on the + Ethereum blockchain. These funds cannot be accessed by Gnosis at any point. - - - ● - - - I understand that my funds are held securely in my Safe. They cannot be accessed by Gnosis. - - - - - ● - - - My Safe is a smart contract on the Ethereum blockchain. - - - - - ) From 25eadc369d450ebcffdde08cb6760adad9b0bdad Mon Sep 17 00:00:00 2001 From: mmv Date: Thu, 18 Jul 2019 17:49:15 +0400 Subject: [PATCH 02/14] remove separate threshold field, fixing validation when removing an owner wip --- package.json | 22 +- src/components/forms/GnoForm/index.jsx | 1 + src/routes/open/components/Layout.jsx | 19 +- .../components/ReviewInformation/index.jsx | 12 +- .../SafeOwnersConfirmationsForm/index.jsx | 192 ++++++++++ .../SafeOwnersConfirmationsForm/style.js | 41 ++ .../SafeOwnersConfirmationsForm/validators.js | 17 + .../open/components/SafeOwnersForm/index.jsx | 212 ----------- .../components/SafeThresholdForm/index.jsx | 91 ----- yarn.lock | 358 +++++++++++++++--- 10 files changed, 588 insertions(+), 377 deletions(-) create mode 100644 src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx create mode 100644 src/routes/open/components/SafeOwnersConfirmationsForm/style.js create mode 100644 src/routes/open/components/SafeOwnersConfirmationsForm/validators.js delete mode 100644 src/routes/open/components/SafeOwnersForm/index.jsx delete mode 100644 src/routes/open/components/SafeThresholdForm/index.jsx diff --git a/package.json b/package.json index 7a8b575b..8ecd8511 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "dependencies": { "@gnosis.pm/safe-contracts": "^1.0.0", "@gnosis.pm/util-contracts": "2.0.1", - "@material-ui/core": "4.2.0", + "@material-ui/core": "4.2.1", "@material-ui/icons": "4.2.1", "@testing-library/jest-dom": "^4.0.0", "@welldone-software/why-did-you-render": "3.2.1", @@ -51,7 +51,7 @@ "react-dom": "^16.8.6", "react-final-form": "6.3.0", "react-final-form-listeners": "^1.0.2", - "react-hot-loader": "4.12.7", + "react-hot-loader": "4.12.8", "react-infinite-scroll-component": "^4.5.2", "react-redux": "7.1.0", "react-router-dom": "^4.3.1", @@ -63,9 +63,9 @@ "web3": "1.0.0-beta.37" }, "devDependencies": { - "@babel/cli": "7.5.0", - "@babel/core": "7.5.4", - "@babel/plugin-proposal-class-properties": "7.5.0", + "@babel/cli": "7.5.5", + "@babel/core": "7.5.5", + "@babel/plugin-proposal-class-properties": "7.5.5", "@babel/plugin-proposal-decorators": "7.4.4", "@babel/plugin-proposal-do-expressions": "7.5.0", "@babel/plugin-proposal-export-default-from": "7.5.2", @@ -84,7 +84,7 @@ "@babel/plugin-transform-member-expression-literals": "^7.2.0", "@babel/plugin-transform-property-literals": "^7.2.0", "@babel/polyfill": "7.4.4", - "@babel/preset-env": "7.5.4", + "@babel/preset-env": "7.5.5", "@babel/preset-flow": "^7.0.0-beta.40", "@babel/preset-react": "^7.0.0-beta.40", "@sambego/storybook-state": "^1.0.7", @@ -102,18 +102,18 @@ "babel-plugin-transform-es3-member-expression-literals": "^6.22.0", "babel-plugin-transform-es3-property-literals": "^6.22.0", "classnames": "^2.2.5", - "css-loader": "3.0.0", + "css-loader": "3.1.0", "detect-port": "^1.2.2", "eslint": "6.0.1", "eslint-config-airbnb": "17.1.1", "eslint-plugin-flowtype": "3.11.1", "eslint-plugin-import": "2.18.0", - "eslint-plugin-jest": "22.9.0", + "eslint-plugin-jest": "22.10.0", "eslint-plugin-jsx-a11y": "6.2.3", "eslint-plugin-react": "7.14.2", "ethereumjs-abi": "^0.6.7", "extract-text-webpack-plugin": "^4.0.0-beta.0", - "file-loader": "4.0.0", + "file-loader": "4.1.0", "flow-bin": "0.102.0", "fs-extra": "8.1.0", "html-loader": "^0.5.5", @@ -123,7 +123,7 @@ "json-loader": "^0.5.7", "mini-css-extract-plugin": "0.8.0", "postcss-loader": "^3.0.0", - "postcss-mixins": "^6.2.0", + "postcss-mixins": "6.2.2", "postcss-simple-vars": "^5.0.2", "pre-commit": "^1.2.2", "prettier-eslint-cli": "5.0.0", @@ -135,7 +135,7 @@ "truffle-contract": "4.0.24", "truffle-solidity-loader": "0.1.26", "uglifyjs-webpack-plugin": "2.1.3", - "webpack": "4.35.3", + "webpack": "4.36.1", "webpack-bundle-analyzer": "3.3.2", "webpack-cli": "3.3.6", "webpack-dev-server": "3.7.2", diff --git a/src/components/forms/GnoForm/index.jsx b/src/components/forms/GnoForm/index.jsx index d3d690db..5adb9c23 100644 --- a/src/components/forms/GnoForm/index.jsx +++ b/src/components/forms/GnoForm/index.jsx @@ -36,6 +36,7 @@ const GnoForm = ({ render={({ handleSubmit, ...rest }) => (
{children(rest.submitting, rest.validating, rest, rest.form.mutators)} + {console.log({ rest })}
)} /> diff --git a/src/routes/open/components/Layout.jsx b/src/routes/open/components/Layout.jsx index e2a545b4..72f5d5a9 100644 --- a/src/routes/open/components/Layout.jsx +++ b/src/routes/open/components/Layout.jsx @@ -1,20 +1,19 @@ // @flow import * as React from 'react' +import ChevronLeft from '@material-ui/icons/ChevronLeft' +import IconButton from '@material-ui/core/IconButton' import Stepper from '~/components/Stepper' import Block from '~/components/layout/Block' import Heading from '~/components/layout/Heading' import Row from '~/components/layout/Row' -import IconButton from '@material-ui/core/IconButton' import Review from '~/routes/open/components/ReviewInformation' -import ChevronLeft from '@material-ui/icons/ChevronLeft' import SafeNameField from '~/routes/open/components/SafeNameForm' -import SafeThresholdField, { safeFieldsValidation } from '~/routes/open/components/SafeThresholdForm' -import SafeOwnersFields from '~/routes/open/components/SafeOwnersForm' +import SafeOwnersFields from '~/routes/open/components/SafeOwnersConfirmationsForm' import { getOwnerNameBy, getOwnerAddressBy, FIELD_CONFIRMATIONS } from '~/routes/open/components/fields' import { history } from '~/store' import { secondary } from '~/theme/variables' -const getSteps = () => ['Start', 'Owners', 'Confirmations', 'Review'] +const getSteps = () => ['Start', 'Owners and confirmations', 'Review'] const initialValuesFrom = (userAccount: string) => ({ [getOwnerNameBy(0)]: 'My Metamask (me)', @@ -55,15 +54,19 @@ const Layout = ({ Create New Safe - + {SafeNameField} {SafeOwnersFields} - {SafeThresholdField} {Review} ) : ( -
No metamask detected
+
No web3 provider detected
)} ) diff --git a/src/routes/open/components/ReviewInformation/index.jsx b/src/routes/open/components/ReviewInformation/index.jsx index 940ea653..056e72c0 100644 --- a/src/routes/open/components/ReviewInformation/index.jsx +++ b/src/routes/open/components/ReviewInformation/index.jsx @@ -129,7 +129,11 @@ const ReviewComponent = ({ values, classes, network }: Props) => { {addresses[index]} - + @@ -143,10 +147,8 @@ const ReviewComponent = ({ values, classes, network }: Props) => { - {"You're about to create a new Safe."} - - - Make sure you have enough ETH in your wallet client to fund this transaction. + You're about to create a new Safe and will have to confirm a transaction with your currently connected + wallet. Make sure you have ETH in this wallet to fund this transaction. diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx b/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx new file mode 100644 index 00000000..d57af2c5 --- /dev/null +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx @@ -0,0 +1,192 @@ +// @flow +import * as React from 'react' +import { withStyles } from '@material-ui/core/styles' +import InputAdornment from '@material-ui/core/InputAdornment' +import CheckCircle from '@material-ui/icons/CheckCircle' +import MenuItem from '@material-ui/core/MenuItem' +import Field from '~/components/forms/Field' +import TextField from '~/components/forms/TextField' +import SelectField from '~/components/forms/SelectField' +import { + required, composeValidators, noErrorsOn, mustBeInteger, minValue, +} from '~/components/forms/validator' +import Block from '~/components/layout/Block' +import Button from '~/components/layout/Button' +import Row from '~/components/layout/Row' +import Img from '~/components/layout/Img' +import Col from '~/components/layout/Col' +import { FIELD_CONFIRMATIONS, getOwnerNameBy, getOwnerAddressBy, getNumOwnersFrom } from '~/routes/open/components/fields' +import Paragraph from '~/components/layout/Paragraph' +import OpenPaper from '~/components/Stepper/OpenPaper' +import { getAccountsFrom } from '~/routes/open/utils/safeDataExtractor' +import Hairline from '~/components/layout/Hairline' +import trash from '~/assets/icons/trash.svg' +import { getAddressValidators } from './validators' +import { styles } from './style' + +type Props = { + classes: Object, + otherAccounts: string[], + errors: Object, + values: Object, + updateInitialProps: (initialValues: Object) => void, +} + +const { useState } = React + +export const ADD_OWNER_BUTTON = '+ ADD ANOTHER OWNER' + +export const calculateValuesAfterRemoving = (index: number, notRemovedOwners: number, values: Object) => { + const initialValues = { ...values } + + const numOwnersAfterRemoving = notRemovedOwners - 1 + // muevo indices + for (let i = index; i < numOwnersAfterRemoving; i += 1) { + initialValues[getOwnerNameBy(i)] = values[getOwnerNameBy(i + 1)] + initialValues[getOwnerAddressBy(i)] = values[getOwnerAddressBy(i + 1)] + } + + if (+values[FIELD_CONFIRMATIONS] === notRemovedOwners) { + initialValues[FIELD_CONFIRMATIONS] = numOwnersAfterRemoving.toString() + } + + delete initialValues[getOwnerNameBy(numOwnersAfterRemoving)] + delete initialValues[getOwnerAddressBy(numOwnersAfterRemoving)] + + return initialValues +} + +const SafeOwners = (props: Props) => { + const { + classes, errors, otherAccounts, values, updateInitialProps, + } = props + const [numOwners, setNumOwners] = useState(1) + const validOwners = getNumOwnersFrom(values) + + const onRemoveRow = (index: number) => () => { + const initialValues = calculateValuesAfterRemoving(index, numOwners, values) + console.log({ initialValues }) + updateInitialProps(initialValues) + + setNumOwners(numOwners - 1) + } + console.log('values in form', { values }) + + const onAddOwner = () => { + setNumOwners(numOwners + 1) + } + + return ( + + + + Specify the owners of the Safe. + + + + + NAME + ADDRESS + + + + {[...Array(Number(numOwners))].map((x, index) => { + const addressName = getOwnerAddressBy(index) + + return ( + + + + + + + + + ), + } + } + type="text" + validate={getAddressValidators(otherAccounts, index)} + placeholder="Owner Address*" + text="Owner Address" + /> + + + {index > 0 && Delete} + + + ) + })} + + + + + + + Any transaction requires the confirmation of: + + + + + {[...Array(Number(validOwners))].map((x, index) => ( + + {index + 1} + + ))} + + + + + out of + {' '} + {validOwners} + {' '} + owner(s) + + + + + + ) +} + +const SafeOwnersForm = withStyles(styles)(SafeOwners) + +const SafeOwnersPage = ({ updateInitialProps }: Object) => (controls: React.Node, { values, errors }: Object) => ( + + + + {console.log('vals one level up', values)} + + +) + +export default SafeOwnersPage diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/style.js b/src/routes/open/components/SafeOwnersConfirmationsForm/style.js new file mode 100644 index 00000000..936e298b --- /dev/null +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/style.js @@ -0,0 +1,41 @@ +// @flow +import { md, lg, sm } from '~/theme/variables' + +export const styles = () => ({ + root: { + display: 'flex', + }, + title: { + padding: `${md} ${lg}`, + }, + owner: { + padding: `0 ${lg}`, + }, + header: { + padding: `${sm} ${lg}`, + }, + name: { + marginRight: `${sm}`, + }, + trash: { + top: '5px', + }, + add: { + justifyContent: 'center', + }, + check: { + color: '#03AE60', + height: '20px', + }, + remove: { + height: '56px', + marginTop: '12px', + maxWidth: '50px', + '&:hover': { + cursor: 'pointer', + }, + }, + owners: { + paddingLeft: md, + }, +}) diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/validators.js b/src/routes/open/components/SafeOwnersConfirmationsForm/validators.js new file mode 100644 index 00000000..c2e8e8fb --- /dev/null +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/validators.js @@ -0,0 +1,17 @@ +// @flow +import { + required, + composeValidators, + uniqueAddress, + mustBeEthereumAddress, +} from '~/components/forms/validator' + +export const getAddressValidators = (addresses: string[], position: number) => { + // thanks Rich Harris + // https://twitter.com/Rich_Harris/status/1125850391155965952 + const copy = addresses.slice() + copy[position] = copy[copy.length - 1] + copy.pop() + + return composeValidators(required, mustBeEthereumAddress, uniqueAddress(copy)) +} \ No newline at end of file diff --git a/src/routes/open/components/SafeOwnersForm/index.jsx b/src/routes/open/components/SafeOwnersForm/index.jsx deleted file mode 100644 index cec64ddc..00000000 --- a/src/routes/open/components/SafeOwnersForm/index.jsx +++ /dev/null @@ -1,212 +0,0 @@ -// @flow -import * as React from 'react' -import { withStyles } from '@material-ui/core/styles' -import InputAdornment from '@material-ui/core/InputAdornment' -import CheckCircle from '@material-ui/icons/CheckCircle' -import Field from '~/components/forms/Field' -import TextField from '~/components/forms/TextField' -import { - required, - composeValidators, - uniqueAddress, - mustBeEthereumAddress, - noErrorsOn, -} from '~/components/forms/validator' -import Block from '~/components/layout/Block' -import Button from '~/components/layout/Button' -import Row from '~/components/layout/Row' -import Img from '~/components/layout/Img' -import Col from '~/components/layout/Col' -import { getOwnerNameBy, getOwnerAddressBy } from '~/routes/open/components/fields' -import Paragraph from '~/components/layout/Paragraph' -import OpenPaper from '~/components/Stepper/OpenPaper' -import { getAccountsFrom } from '~/routes/open/utils/safeDataExtractor' -import Hairline from '~/components/layout/Hairline' -import { md, lg, sm } from '~/theme/variables' -import trash from '~/assets/icons/trash.svg' - -type Props = { - classes: Object, - otherAccounts: string[], - errors: Object, - values: Object, - updateInitialProps: (initialValues: Object) => void, -} - -type State = { - numOwners: number, -} - -const styles = () => ({ - root: { - display: 'flex', - }, - title: { - padding: `${md} ${lg}`, - }, - owner: { - padding: `0 ${lg}`, - }, - header: { - padding: `${sm} ${lg}`, - }, - name: { - marginRight: `${sm}`, - }, - trash: { - top: '5px', - }, - add: { - justifyContent: 'center', - }, - check: { - color: '#03AE60', - height: '20px', - }, - remove: { - height: '56px', - marginTop: '12px', - maxWidth: '50px', - '&:hover': { - cursor: 'pointer', - }, - }, -}) - -const getAddressValidators = (addresses: string[], position: number) => { - // thanks Rich Harris - // https://twitter.com/Rich_Harris/status/1125850391155965952 - const copy = addresses.slice() - copy[position] = copy[copy.length - 1] - copy.pop() - - return composeValidators(required, mustBeEthereumAddress, uniqueAddress(copy)) -} - -export const ADD_OWNER_BUTTON = '+ ADD ANOTHER OWNER' - -export const calculateValuesAfterRemoving = (index: number, notRemovedOwners: number, values: Object) => { - const initialValues = { ...values } - const numOwnersAfterRemoving = notRemovedOwners - 1 - // muevo indices - for (let i = index; i < numOwnersAfterRemoving; i += 1) { - initialValues[getOwnerNameBy(i)] = values[getOwnerNameBy(i + 1)] - initialValues[getOwnerAddressBy(i)] = values[getOwnerAddressBy(i + 1)] - } - - delete initialValues[getOwnerNameBy(numOwnersAfterRemoving)] - delete initialValues[getOwnerAddressBy(numOwnersAfterRemoving)] - - return initialValues -} - -class SafeOwners extends React.PureComponent { - state = { - numOwners: 1, - } - - onRemoveRow = (index: number) => () => { - const { values, updateInitialProps } = this.props - const { numOwners } = this.state - const initialValues = calculateValuesAfterRemoving(index, numOwners, values) - updateInitialProps(initialValues) - - this.setState(state => ({ - numOwners: state.numOwners - 1, - })) - } - - onAddOwner = () => { - this.setState(state => ({ - numOwners: state.numOwners + 1, - })) - } - - render() { - const { classes, errors, otherAccounts } = this.props - const { numOwners } = this.state - - return ( - - - - Specify the owners of the Safe. - - - - - NAME - ADDRESS - - - - {[...Array(Number(numOwners))].map((x, index) => { - const addressName = getOwnerAddressBy(index) - - return ( - - - - - - - - - ), - } - } - type="text" - validate={getAddressValidators(otherAccounts, index)} - placeholder="Owner Address*" - text="Owner Address" - /> - - - {index > 0 && Delete} - - - ) - })} - - - - - - ) - } -} - -const SafeOwnersForm = withStyles(styles)(SafeOwners) - -const SafeOwnersPage = ({ updateInitialProps }: Object) => (controls: React.Node, { values, errors }: Object) => ( - - - - - -) - -export default SafeOwnersPage diff --git a/src/routes/open/components/SafeThresholdForm/index.jsx b/src/routes/open/components/SafeThresholdForm/index.jsx deleted file mode 100644 index 9571525f..00000000 --- a/src/routes/open/components/SafeThresholdForm/index.jsx +++ /dev/null @@ -1,91 +0,0 @@ -// @flow -import * as React from 'react' -import { withStyles } from '@material-ui/core/styles' -import MenuItem from '@material-ui/core/MenuItem' -import Field from '~/components/forms/Field' -import SelectField from '~/components/forms/SelectField' -import { - composeValidators, minValue, mustBeInteger, required, -} from '~/components/forms/validator' -import Block from '~/components/layout/Block' -import Row from '~/components/layout/Row' -import Col from '~/components/layout/Col' -import Paragraph from '~/components/layout/Paragraph' -import OpenPaper from '~/components/Stepper/OpenPaper' -import { FIELD_CONFIRMATIONS, getNumOwnersFrom } from '~/routes/open/components/fields' -import { md } from '~/theme/variables' - -type Props = { - classes: Object, - values: Object, -} - -const styles = () => ({ - owners: { - paddingLeft: md, - }, -}) - -export const CONFIRMATIONS_ERROR = 'Number of confirmations can not be higher than the number of owners' - -export const safeFieldsValidation = (values: Object) => { - const errors = {} - - const numOwners = getNumOwnersFrom(values) - if (numOwners < Number.parseInt(values[FIELD_CONFIRMATIONS], 10)) { - errors[FIELD_CONFIRMATIONS] = CONFIRMATIONS_ERROR - } - - return errors -} - -const SafeThreshold = ({ classes, values }: Props) => { - const numOwners = getNumOwnersFrom(values) - - return ( - - - - Any transaction requires the confirmation of: - - - - - - {[...Array(Number(numOwners))].map((x, index) => ( - - {index + 1} - - ))} - - - - - out of - {' '} - {numOwners} - {' '} - owner(s) - - - - - ) -} - -const SafeThresholdForm = withStyles(styles)(SafeThreshold) - -const SafeOwnersPage = () => (controls: React.Node, { values }: Object) => ( - - - - - -) - -export default SafeOwnersPage diff --git a/yarn.lock b/yarn.lock index 5f68481f..24df1b98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,16 +2,16 @@ # yarn lockfile v1 -"@babel/cli@7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.5.0.tgz#f403c930692e28ecfa3bf02a9e7562b474f38271" - integrity sha512-qNH55fWbKrEsCwID+Qc/3JDPnsSGpIIiMDbppnR8Z6PxLAqMQCFNqBctkIkBrMH49Nx+qqVTrHRWUR+ho2k+qQ== +"@babel/cli@7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.5.5.tgz#bdb6d9169e93e241a08f5f7b0265195bf38ef5ec" + integrity sha512-UHI+7pHv/tk9g6WXQKYz+kmXTI77YtuY3vqC59KIqcoWEjsJJSG6rAxKaLsgj3LDyadsPrCB929gVOKM6Hui0w== dependencies: commander "^2.8.1" convert-source-map "^1.1.0" fs-readdir-recursive "^1.1.0" glob "^7.0.0" - lodash "^4.17.11" + lodash "^4.17.13" mkdirp "^0.5.1" output-file-sync "^2.0.0" slash "^2.0.0" @@ -26,6 +26,13 @@ dependencies: "@babel/highlight" "^7.0.0" +"@babel/code-frame@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" + integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== + dependencies: + "@babel/highlight" "^7.0.0" + "@babel/core@7.4.3": version "7.4.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.3.tgz#198d6d3af4567be3989550d97e068de94503074f" @@ -46,7 +53,27 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@7.5.4", "@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.4.5": +"@babel/core@7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.5.5.tgz#17b2686ef0d6bc58f963dddd68ab669755582c30" + integrity sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.5.5" + "@babel/helpers" "^7.5.5" + "@babel/parser" "^7.5.5" + "@babel/template" "^7.4.4" + "@babel/traverse" "^7.5.5" + "@babel/types" "^7.5.5" + convert-source-map "^1.1.0" + debug "^4.1.0" + json5 "^2.1.0" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.4.5": version "7.5.4" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.5.4.tgz#4c32df7ad5a58e9ea27ad025c11276324e0b4ddd" integrity sha512-+DaeBEpYq6b2+ZmHx3tHspC+ZRflrvLqwfv8E3hNr5LVQoyBnL8RPKSBCg+rK2W2My9PWlujBiqd0ZPsR9Q6zQ== @@ -77,6 +104,17 @@ source-map "^0.5.0" trim-right "^1.0.1" +"@babel/generator@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.5.5.tgz#873a7f936a3c89491b43536d12245b626664e3cf" + integrity sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ== + dependencies: + "@babel/types" "^7.5.5" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + trim-right "^1.0.1" + "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" @@ -121,6 +159,18 @@ "@babel/helper-replace-supers" "^7.4.4" "@babel/helper-split-export-declaration" "^7.4.4" +"@babel/helper-create-class-features-plugin@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.5.5.tgz#401f302c8ddbc0edd36f7c6b2887d8fa1122e5a4" + integrity sha512-ZsxkyYiRA7Bg+ZTRpPvB6AbOFKTFFK4LrvTet8lInm0V468MWCaSYJE+I7v2z2r8KNLtYiV+K5kTCnR7dvyZjg== + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-member-expression-to-functions" "^7.5.5" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.5.5" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/helper-define-map@^7.4.0", "@babel/helper-define-map@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz#6969d1f570b46bdc900d1eba8e5d59c48ba2c12a" @@ -130,6 +180,15 @@ "@babel/types" "^7.4.4" lodash "^4.17.11" +"@babel/helper-define-map@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz#3dec32c2046f37e09b28c93eb0b103fd2a25d369" + integrity sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg== + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/types" "^7.5.5" + lodash "^4.17.13" + "@babel/helper-explode-assignable-expression@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" @@ -168,6 +227,13 @@ dependencies: "@babel/types" "^7.0.0" +"@babel/helper-member-expression-to-functions@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz#1fb5b8ec4453a93c439ee9fe3aeea4a84b76b590" + integrity sha512-5qZ3D1uMclSNqYcXqiHoA0meVdv+xUEex9em2fqMnrk/scphGlGgg66zjMrPJESPwrFJ6sbfFQYUSa0Mz7FabA== + dependencies: + "@babel/types" "^7.5.5" + "@babel/helper-module-imports@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" @@ -227,6 +293,16 @@ "@babel/traverse" "^7.4.4" "@babel/types" "^7.4.4" +"@babel/helper-replace-supers@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz#f84ce43df031222d2bad068d2626cb5799c34bc2" + integrity sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.5.5" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/traverse" "^7.5.5" + "@babel/types" "^7.5.5" + "@babel/helper-simple-access@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" @@ -261,6 +337,15 @@ "@babel/traverse" "^7.5.0" "@babel/types" "^7.5.0" +"@babel/helpers@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.5.5.tgz#63908d2a73942229d1e6685bc2a0e730dde3b75e" + integrity sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g== + dependencies: + "@babel/template" "^7.4.4" + "@babel/traverse" "^7.5.5" + "@babel/types" "^7.5.5" + "@babel/highlight@^7.0.0": version "7.5.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" @@ -275,6 +360,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.0.tgz#3e0713dff89ad6ae37faec3b29dcfc5c979770b7" integrity sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA== +"@babel/parser@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.5.tgz#02f077ac8817d3df4a832ef59de67565e71cca4b" + integrity sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g== + "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" @@ -292,7 +382,15 @@ "@babel/helper-create-class-features-plugin" "^7.4.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-proposal-class-properties@7.5.0", "@babel/plugin-proposal-class-properties@^7.3.3": +"@babel/plugin-proposal-class-properties@7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz#a974cfae1e37c3110e71f3c6a2e48b8e71958cd4" + integrity sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.5.5" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-proposal-class-properties@^7.3.3": version "7.5.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.0.tgz#5bc6a0537d286fcb4fd4e89975adbca334987007" integrity sha512-9L/JfPCT+kShiiTTzcnBJ8cOwdKVmlC1RcCf9F0F9tERVrM4iWtWnXtjWCRqNm2la2BxO1MPArWNsU9zsSJWSQ== @@ -415,6 +513,14 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" +"@babel/plugin-proposal-object-rest-spread@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz#61939744f71ba76a3ae46b5eea18a54c16d22e58" + integrity sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + "@babel/plugin-proposal-optional-catch-binding@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" @@ -634,6 +740,14 @@ "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.11" +"@babel/plugin-transform-block-scoping@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.5.5.tgz#a35f395e5402822f10d2119f6f8e045e3639a2ce" + integrity sha512-82A3CLRRdYubkG85lKwhZB0WZoHxLGsJdux/cOVaJCJpvYFl1LVzAIFyRsa7CvXqW8rBM4Zf3Bfn8PHt5DP0Sg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + lodash "^4.17.13" + "@babel/plugin-transform-classes@7.4.3": version "7.4.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.3.tgz#adc7a1137ab4287a555d429cc56ecde8f40c062c" @@ -662,6 +776,20 @@ "@babel/helper-split-export-declaration" "^7.4.4" globals "^11.1.0" +"@babel/plugin-transform-classes@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz#d094299d9bd680a14a2a0edae38305ad60fb4de9" + integrity sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-define-map" "^7.5.5" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.5.5" + "@babel/helper-split-export-declaration" "^7.4.4" + globals "^11.1.0" + "@babel/plugin-transform-computed-properties@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" @@ -810,6 +938,14 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.1.0" +"@babel/plugin-transform-object-super@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.5.5.tgz#c70021df834073c65eb613b8679cc4a381d1a9f9" + integrity sha512-un1zJQAhSosGFBduPgN/YFNvWVpRuHKU7IHBglLoLZsGmruJPOo6pbInneflUdmq7YvSVqhpPs5zdBvLnteltQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.5.5" + "@babel/plugin-transform-parameters@^7.4.3", "@babel/plugin-transform-parameters@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz#7556cf03f318bd2719fe4c922d2d808be5571e16" @@ -1015,7 +1151,63 @@ js-levenshtein "^1.1.3" semver "^5.5.0" -"@babel/preset-env@7.5.4", "@babel/preset-env@^7.4.5": +"@babel/preset-env@7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.5.5.tgz#bc470b53acaa48df4b8db24a570d6da1fef53c9a" + integrity sha512-GMZQka/+INwsMz1A5UEql8tG015h5j/qjptpKY2gJ7giy8ohzU710YciJB5rcKsWGWHiW3RUnHib0E5/m3Tp3A== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-async-generator-functions" "^7.2.0" + "@babel/plugin-proposal-dynamic-import" "^7.5.0" + "@babel/plugin-proposal-json-strings" "^7.2.0" + "@babel/plugin-proposal-object-rest-spread" "^7.5.5" + "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-syntax-async-generators" "^7.2.0" + "@babel/plugin-syntax-dynamic-import" "^7.2.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + "@babel/plugin-transform-arrow-functions" "^7.2.0" + "@babel/plugin-transform-async-to-generator" "^7.5.0" + "@babel/plugin-transform-block-scoped-functions" "^7.2.0" + "@babel/plugin-transform-block-scoping" "^7.5.5" + "@babel/plugin-transform-classes" "^7.5.5" + "@babel/plugin-transform-computed-properties" "^7.2.0" + "@babel/plugin-transform-destructuring" "^7.5.0" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/plugin-transform-duplicate-keys" "^7.5.0" + "@babel/plugin-transform-exponentiation-operator" "^7.2.0" + "@babel/plugin-transform-for-of" "^7.4.4" + "@babel/plugin-transform-function-name" "^7.4.4" + "@babel/plugin-transform-literals" "^7.2.0" + "@babel/plugin-transform-member-expression-literals" "^7.2.0" + "@babel/plugin-transform-modules-amd" "^7.5.0" + "@babel/plugin-transform-modules-commonjs" "^7.5.0" + "@babel/plugin-transform-modules-systemjs" "^7.5.0" + "@babel/plugin-transform-modules-umd" "^7.2.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.4.5" + "@babel/plugin-transform-new-target" "^7.4.4" + "@babel/plugin-transform-object-super" "^7.5.5" + "@babel/plugin-transform-parameters" "^7.4.4" + "@babel/plugin-transform-property-literals" "^7.2.0" + "@babel/plugin-transform-regenerator" "^7.4.5" + "@babel/plugin-transform-reserved-words" "^7.2.0" + "@babel/plugin-transform-shorthand-properties" "^7.2.0" + "@babel/plugin-transform-spread" "^7.2.0" + "@babel/plugin-transform-sticky-regex" "^7.2.0" + "@babel/plugin-transform-template-literals" "^7.4.4" + "@babel/plugin-transform-typeof-symbol" "^7.2.0" + "@babel/plugin-transform-unicode-regex" "^7.4.4" + "@babel/types" "^7.5.5" + browserslist "^4.6.0" + core-js-compat "^3.1.1" + invariant "^2.2.2" + js-levenshtein "^1.1.3" + semver "^5.5.0" + +"@babel/preset-env@^7.4.5": version "7.5.4" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.5.4.tgz#64bc15041a3cbb0798930319917e70fcca57713d" integrity sha512-hFnFnouyRNiH1rL8YkX1ANCNAUVC8Djwdqfev8i1415tnAG+7hlA5zhZ0Q/3Q5gkop4HioIPbCEWAalqcbxRoQ== @@ -1151,6 +1343,21 @@ globals "^11.1.0" lodash "^4.17.11" +"@babel/traverse@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.5.tgz#f664f8f368ed32988cd648da9f72d5ca70f165bb" + integrity sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.5.5" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.5.5" + "@babel/types" "^7.5.5" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + "@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.0": version "7.5.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.0.tgz#e47d43840c2e7f9105bc4d3a2c371b4d0c7832ab" @@ -1160,6 +1367,15 @@ lodash "^4.17.11" to-fast-properties "^2.0.0" +"@babel/types@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.5.tgz#97b9f728e182785909aa4ab56264f090a028d18a" + integrity sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@cnakazawa/watch@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef" @@ -1482,10 +1698,10 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^12.0.9" -"@material-ui/core@4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.2.0.tgz#fd57352c63a50bc28d8b0d61a779a55aba84f9c4" - integrity sha512-kqwoCMpGaj3zJedihUuVZWjISh+T72KAXOwgk6VKNf+APMTB8yLByLSgSLDhXsliRBO/9Pda/0g/KzGY7R+irQ== +"@material-ui/core@4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.2.1.tgz#18255c01d039ff856bfdb2f955fec6c9ae64a464" + integrity sha512-hasPQUFAb9OxKng7UX2+SjUWtVZbnkVJ/jHZWXTivVcU+UzvNIpA9AyRRQvZ8SPV6swP/HD2VzUBzoMEeRR6wg== dependencies: "@babel/runtime" "^7.2.0" "@material-ui/styles" "^4.2.0" @@ -1494,8 +1710,8 @@ "@material-ui/utils" "^4.1.0" "@types/react-transition-group" "^2.0.16" clsx "^1.0.2" - convert-css-length "^2.0.0" - deepmerge "^3.0.0" + convert-css-length "^2.0.1" + deepmerge "^4.0.0" hoist-non-react-statics "^3.2.1" is-plain-object "^3.0.0" normalize-scroll-left "^0.2.0" @@ -4207,14 +4423,14 @@ bignumber.js@^7.2.1: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== +"bignumber.js@git+https://github.com/debris/bignumber.js#master": + version "2.0.7" + resolved "git+https://github.com/debris/bignumber.js#c7a38de919ed75e6fb6ba38051986e294b328df9" + "bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2": version "2.0.7" resolved "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" -"bignumber.js@git+https://github.com/debris/bignumber.js.git#master": - version "2.0.7" - resolved "git+https://github.com/debris/bignumber.js.git#c7a38de919ed75e6fb6ba38051986e294b328df9" - "bignumber.js@git+https://github.com/frozeman/bignumber.js-nolookahead.git": version "2.0.7" resolved "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934" @@ -5354,7 +5570,7 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -convert-css-length@^2.0.0: +convert-css-length@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/convert-css-length/-/convert-css-length-2.0.1.tgz#90a76bde5bfd24d72881a5b45d02249b2c1d257c" integrity sha512-iGpbcvhLPRKUbBc0Quxx7w/bV14AC3ItuBEGMahA5WTYqB8lq9jH0kTXFheCBASsYnqeMFZhiTruNxr1N59Axg== @@ -5633,10 +5849,10 @@ css-in-js-utils@^2.0.0: hyphenate-style-name "^1.0.2" isobject "^3.0.1" -css-loader@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.0.0.tgz#bdd48a4921eefedf1f0a55266585944d4e5efc63" - integrity sha512-WR6KZuCkFbnMhRrGPlkwAA7SSCtwqPwpyXJAPhotYkYsc0mKU9n/fu5wufy4jl2WhBw9Ia8gUQMIp/1w98DuPw== +css-loader@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.1.0.tgz#6f008b993b8ce812e6bab57f3cbfdc7a7cf28685" + integrity sha512-MuL8WsF/KSrHCBCYaozBKlx+r7vIfUaDTEreo7wR7Vv3J6N0z6fqWjRk3e/6wjneitXN1r/Y9FTK1psYNOBdJQ== dependencies: camelcase "^5.3.1" cssesc "^3.0.0" @@ -5649,7 +5865,7 @@ css-loader@3.0.0: postcss-modules-scope "^2.1.0" postcss-modules-values "^3.0.0" postcss-value-parser "^4.0.0" - schema-utils "^1.0.0" + schema-utils "^2.0.0" css-loader@^2.1.1: version "2.1.1" @@ -6025,6 +6241,11 @@ deepmerge@^3.0.0: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.3.0.tgz#d3c47fd6f3a93d517b14426b0628a17b0125f5f7" integrity sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA== +deepmerge@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.0.0.tgz#3e3110ca29205f120d7cb064960a39c3d2087c09" + integrity sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww== + default-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" @@ -6749,10 +6970,10 @@ eslint-plugin-import@2.18.0: read-pkg-up "^2.0.0" resolve "^1.11.0" -eslint-plugin-jest@22.9.0: - version "22.9.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.9.0.tgz#2573dbcb4f1066b96a6e6d3b9aa439c80b28975a" - integrity sha512-V89BUiwf76FHlhj1mlNhNyvpzTy8VbWCh2RZpKYz/XDSl/pcuwFiE/LMt7r3q1sRKygzEMjbYeDob8MMuvakXg== +eslint-plugin-jest@22.10.0: + version "22.10.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.10.0.tgz#a22be77f4dc692808b88ead0059620bda299a97d" + integrity sha512-iBEWJn60Z5bctcjacymUnOQ3xN3gdvGOy3tDHpalAa99r4+jwH0CvICsIIHBNXNlJxuklkbx+wxr49tXk6M0tg== eslint-plugin-jsx-a11y@6.2.3: version "6.2.3" @@ -7716,13 +7937,13 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" -file-loader@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-4.0.0.tgz#c3570783fefb6e1bc0978a856f4bf5825b966c2a" - integrity sha512-roAbL6IdSGczwfXxhMi6Zq+jD4IfUpL0jWHD7fvmjdOVb7xBfdRUHe4LpBgO23VtVK5AW1OlWZo0p34Jvx3iWg== +file-loader@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-4.1.0.tgz#3a763391bc9502da7c59612fe348e38fc1980336" + integrity sha512-ajDk1nlByoalZAGR4b0H6oD+EGlWnyW1qbSxzaUc7RFiqmn+RbXQQRbTc72jsiUIlVusJ4Et58ltds8ZwTfnAw== dependencies: - loader-utils "^1.2.2" - schema-utils "^1.0.0" + loader-utils "^1.2.3" + schema-utils "^2.0.0" file-loader@^3.0.1: version "3.0.1" @@ -10987,7 +11208,7 @@ loader-runner@^2.3.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== -loader-utils@1.2.3, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.2, loader-utils@^1.2.3: +loader-utils@1.2.3, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== @@ -11114,7 +11335,7 @@ lodash@4.17.11: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== -"lodash@>=3.5 <5", lodash@^4, lodash@^4.0.1, lodash@^4.1.0, lodash@^4.11.2, lodash@^4.15.0, lodash@^4.17.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1: +"lodash@>=3.5 <5", lodash@^4, lodash@^4.0.1, lodash@^4.1.0, lodash@^4.11.2, lodash@^4.15.0, lodash@^4.17.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1: version "4.17.14" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== @@ -12961,7 +13182,7 @@ postcss-flexbugs-fixes@^4.1.0: dependencies: postcss "^7.0.0" -postcss-js@^2.0.0: +postcss-js@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-2.0.2.tgz#a5e75d3fb9d85b28e1d2bd57956c115665ea8542" integrity sha512-HxXLw1lrczsbVXxyC+t/VIfje9ZeZhkkXE8KpFa3MEKfp2FyHDv29JShYY9eLhYrhLyWWHNIuwkktTfLXu2otw== @@ -13049,15 +13270,15 @@ postcss-minify-selectors@^4.0.2: postcss "^7.0.0" postcss-selector-parser "^3.0.0" -postcss-mixins@^6.2.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/postcss-mixins/-/postcss-mixins-6.2.1.tgz#f2a6abb449410929a184b23fbef7c96898cf01e5" - integrity sha512-XfItKgFHAPKa4mayLVwoASYzzRLyW64mEtsVZz7LT7ElrprVZx9D5ivqOi5oQCkUxyiLs9sjg4aiRxr+gK9xkQ== +postcss-mixins@6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/postcss-mixins/-/postcss-mixins-6.2.2.tgz#3acea63271e2c75db62fb80bc1c29e1a609a4742" + integrity sha512-QqEZamiAMguYR6d2h73XXEHZgkxs03PlbU0PqgqtdCnbRlMLFNQgsfL/Td0rjIe2SwpLXOQyB9uoiLWa4GR7tg== dependencies: globby "^8.0.1" - postcss "^7.0.6" - postcss-js "^2.0.0" - postcss-simple-vars "^5.0.1" + postcss "^7.0.17" + postcss-js "^2.0.2" + postcss-simple-vars "^5.0.2" sugarss "^2.0.0" postcss-modules-extract-imports@^2.0.0: @@ -13247,7 +13468,7 @@ postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2: indexes-of "^1.0.1" uniq "^1.0.1" -postcss-simple-vars@^5.0.1, postcss-simple-vars@^5.0.2: +postcss-simple-vars@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/postcss-simple-vars/-/postcss-simple-vars-5.0.2.tgz#e2f81b3d0847ddd4169816b6d141b91d51e6e22e" integrity sha512-xWIufxBoINJv6JiLb7jl5oElgp+6puJwvT5zZHliUSydoLz4DADRB3NDDsYgfKVwojn4TDLiseoC65MuS8oGGg== @@ -13897,10 +14118,10 @@ react-helmet-async@^1.0.2: react-fast-compare "2.0.4" shallowequal "1.1.0" -react-hot-loader@4.12.7: - version "4.12.7" - resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.7.tgz#51ed57ee46c5d4d3906e58e8cdcd3f6ceeb1c0ec" - integrity sha512-ejnGcNttqIsgaLEpCl3KHLzFfKiEKHz/VTLYv57/xKQoryDMXQ/w31+jicrOAiCStYsY+KvrulVqkOqqkRaifg== +react-hot-loader@4.12.8: + version "4.12.8" + resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.8.tgz#90ecf2ef7d4005e110292760f135c95177e804c7" + integrity sha512-/Df2J3znMHzRzI6CW0dTOIWD2sjkVHxv56XCqujAo9mR+k2PVTiGjUgYBiGPGsix9zQzgCRfOKca93o9Zdj2vQ== dependencies: fast-levenshtein "^2.0.6" global "^4.3.0" @@ -14967,6 +15188,14 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" +schema-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.0.0.tgz#e5bc78a5bff1e771e566b52f6a523b345352a448" + integrity sha512-4JfkJmuT78xkJAZrYivuu6RNfX57ul5u+jsfxwRAdWw5eE1qIY/i4go1A3zAdJlTwYXLbvWHWXVvoYu3PjGf9A== + dependencies: + ajv "^6.1.0" + ajv-keywords "^3.1.0" + scrypt-js@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.3.tgz#bb0040be03043da9a012a2cea9fc9f852cfc87d4" @@ -18445,7 +18674,36 @@ webpack-sources@^1.1.0, webpack-sources@^1.3.0: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@4.35.3, webpack@^4.33.0: +webpack@4.36.1: + version "4.36.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.36.1.tgz#f546fda7a403a76faeaaa7196c50d12370ed18a9" + integrity sha512-Ej01/N9W8DVyhEpeQnbUdGvOECw0L46FxS12cCOs8gSK7bhUlrbHRnWkjiXckGlHjUrmL89kDpTRIkUk6Y+fKg== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-module-context" "1.8.5" + "@webassemblyjs/wasm-edit" "1.8.5" + "@webassemblyjs/wasm-parser" "1.8.5" + acorn "^6.2.0" + ajv "^6.1.0" + ajv-keywords "^3.1.0" + chrome-trace-event "^1.0.0" + enhanced-resolve "^4.1.0" + eslint-scope "^4.0.0" + json-parse-better-errors "^1.0.2" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + micromatch "^3.1.8" + mkdirp "~0.5.0" + neo-async "^2.5.0" + node-libs-browser "^2.0.0" + schema-utils "^1.0.0" + tapable "^1.1.0" + terser-webpack-plugin "^1.1.0" + watchpack "^1.5.0" + webpack-sources "^1.3.0" + +webpack@^4.33.0: version "4.35.3" resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.35.3.tgz#66bc35ef215a7b75e8790f84d560013ffecf0ca3" integrity sha512-xggQPwr9ILlXzz61lHzjvgoqGU08v5+Wnut19Uv3GaTtzN4xBTcwnobodrXE142EL1tOiS5WVEButooGzcQzTA== From f9c67171a80f5de1e9753ca530f172340e44d95c Mon Sep 17 00:00:00 2001 From: mmv Date: Thu, 18 Jul 2019 18:21:02 +0400 Subject: [PATCH 03/14] Refactor stepper to hooks --- src/components/Loader/index.jsx | 2 +- src/components/Stepper/index.jsx | 195 +++++++----------- src/routes/load/components/Layout.jsx | 10 +- src/routes/open/components/Layout.jsx | 8 +- .../SafeOwnersConfirmationsForm/index.jsx | 8 +- .../SafeOwnersConfirmationsForm/validators.js | 2 +- .../components/SendToken/ReviewTx/index.jsx | 39 ---- .../SendToken/SendTokenForm/index.jsx | 53 ----- .../safe/components/SendToken/actions.js | 10 - .../safe/components/SendToken/index.jsx | 119 ----------- .../safe/components/SendToken/selector.js | 11 - .../components/Threshold/Review/index.jsx | 34 --- .../Threshold/ThresholdForm/index.jsx | 46 ----- .../safe/components/Threshold/actions.js | 10 - .../safe/components/Threshold/index.jsx | 86 -------- .../safe/components/Threshold/selector.js | 11 - 16 files changed, 94 insertions(+), 550 deletions(-) delete mode 100644 src/routes/safe/components/SendToken/ReviewTx/index.jsx delete mode 100644 src/routes/safe/components/SendToken/SendTokenForm/index.jsx delete mode 100644 src/routes/safe/components/SendToken/actions.js delete mode 100644 src/routes/safe/components/SendToken/index.jsx delete mode 100644 src/routes/safe/components/SendToken/selector.js delete mode 100644 src/routes/safe/components/Threshold/Review/index.jsx delete mode 100644 src/routes/safe/components/Threshold/ThresholdForm/index.jsx delete mode 100644 src/routes/safe/components/Threshold/actions.js delete mode 100644 src/routes/safe/components/Threshold/index.jsx delete mode 100644 src/routes/safe/components/Threshold/selector.js diff --git a/src/components/Loader/index.jsx b/src/components/Loader/index.jsx index 5ae3f7b9..78906e6b 100644 --- a/src/components/Loader/index.jsx +++ b/src/components/Loader/index.jsx @@ -1,7 +1,7 @@ // @flow import * as React from 'react' -import Page from '~/components/layout/Page' import CircularProgress from '@material-ui/core/CircularProgress' +import Page from '~/components/layout/Page' const centerStyle = { margin: 'auto 0', diff --git a/src/components/Stepper/index.jsx b/src/components/Stepper/index.jsx index 7d3de182..9c69ec5e 100644 --- a/src/components/Stepper/index.jsx +++ b/src/components/Stepper/index.jsx @@ -1,16 +1,17 @@ // @flow +import * as React from 'react' import Stepper from '@material-ui/core/Stepper' import FormStep from '@material-ui/core/Step' import StepLabel from '@material-ui/core/StepLabel' import StepContent from '@material-ui/core/StepContent' import { withStyles } from '@material-ui/core/styles' -import * as React from 'react' import GnoForm from '~/components/forms/GnoForm' import Hairline from '~/components/layout/Hairline' -import Button from '~/components/layout/Button' import { history } from '~/store' import Controls from './Controls' +const { useState, useEffect } = React + export { default as Step } from './Step' type Props = { @@ -18,20 +19,14 @@ type Props = { onSubmit: (values: Object) => Promise, children: React.Node, classes: Object, - onReset?: () => void, initialValues?: Object, disabledWhenValidating?: boolean, testId?: string, } -type State = { - page: number, - values: Object, -} - type PageProps = { children: Function, - prepareNextInitialProps: (values: Object) => {}, + prepareNextInitialProps?: (values: Object) => {}, } const transitionProps = { @@ -41,151 +36,117 @@ const transitionProps = { }, } -class GnoStepper extends React.PureComponent { - static Page = ({ children }: PageProps) => children +export const StepperPage = ({ children }: PageProps) => children - static FinishButton = ({ - component, to, title, ...props - }) => ( - - ) +const GnoStepper = (props: Props) => { + const [page, setPage] = useState(0) + const [values, setValues] = useState({}) - constructor(props: Props) { - super(props) - - this.state = { - page: 0, - values: props.initialValues || {}, + useEffect(() => { + if (props.initialValues) { + setValues(props.initialValues) } + }, []) + + const getPageProps = (pages: React.Node): PageProps => React.Children.toArray(pages)[page].props + + const updateInitialProps = (newInitialProps) => { + setValues(newInitialProps) } - onReset = () => { - const { onReset, initialValues } = this.props - if (onReset) { - onReset() - } + const getActivePageFrom = (pages: React.Node) => { + const activePageProps = getPageProps(pages) + const { children, ...restProps } = activePageProps - this.setState(() => ({ - page: 0, - values: initialValues || {}, - })) + return children({ ...restProps, updateInitialProps }) } - getPageProps = (pages: React.Node): PageProps => { - const { page } = this.state - - return React.Children.toArray(pages)[page].props - } - - getActivePageFrom = (pages: React.Node) => { - const activePageProps = this.getPageProps(pages) - const { children, ...props } = activePageProps - - return children({ ...props, updateInitialProps: this.updateInitialProps }) - } - - updateInitialProps = (values) => { - this.setState({ values }) - } - - validate = (values: Object) => { - const { children } = this.props - const { page } = this.state + const validate = (valuesToValidate: Object) => { + const { children } = props const activePage = React.Children.toArray(children)[page] - return activePage.props.validate ? activePage.props.validate(values) : {} + return activePage.props.validate ? activePage.props.validate(valuesToValidate) : {} } - next = async (values: Object) => { - const { children } = this.props - const activePageProps = this.getPageProps(children) + const next = async (formValues: Object) => { + const { children } = props + const activePageProps = getPageProps(children) const { prepareNextInitialProps } = activePageProps let pageInitialProps if (prepareNextInitialProps) { - pageInitialProps = await prepareNextInitialProps(values) + pageInitialProps = await prepareNextInitialProps(formValues) } - const finalValues = { ...values, ...pageInitialProps } - this.setState(state => ({ - page: Math.min(state.page + 1, React.Children.count(children) - 1), - values: finalValues, - })) + const finalValues = { ...formValues, ...pageInitialProps } + + setValues(finalValues) + setPage(Math.min(page + 1, React.Children.count(children) - 1)) } - previous = () => { - const { page } = this.state - + const previous = () => { const firstPage = page === 0 if (firstPage) { return history.goBack() } - return this.setState(state => ({ - page: Math.max(state.page - 1, 0), - })) + return setPage(Math.max(page - 1, 0)) } - handleSubmit = async (values: Object) => { - const { children, onSubmit } = this.props - const { page } = this.state + const handleSubmit = async (formValues: Object) => { + const { children, onSubmit } = props const isLastPage = page === React.Children.count(children) - 1 if (isLastPage) { - return onSubmit(values) + return onSubmit(formValues) } - return this.next(values) + return next(formValues) } - isLastPage = (page) => { - const { steps } = this.props - return page === steps.length - 1 + const isLastPage = (pageNumber) => { + const { steps } = props + return pageNumber === steps.length - 1 } - render() { - const { - steps, children, classes, disabledWhenValidating = false, testId, - } = this.props - const { page, values } = this.state - const activePage = this.getActivePageFrom(children) - const lastPage = this.isLastPage(page) - const penultimate = this.isLastPage(page + 1) + const { + steps, children, classes, disabledWhenValidating = false, testId, + } = props + const activePage = getActivePageFrom(children) + const lastPage = isLastPage(page) + const penultimate = isLastPage(page + 1) - return ( - - - {(submitting: boolean, validating: boolean, ...rest: any) => { - const disabled = disabledWhenValidating ? submitting || validating : submitting - const controls = ( - - - - - ) + return ( + + + {(submitting: boolean, validating: boolean, ...rest: any) => { + const disabled = disabledWhenValidating ? submitting || validating : submitting + const controls = ( + + + + + ) - return ( - - {steps.map(label => ( - - {label} - {activePage(controls, ...rest)} - - ))} - - ) - }} - - - ) - } + return ( + + {steps.map(label => ( + + {label} + {activePage(controls, ...rest)} + + ))} + + ) + }} + + + ) } const styles = { diff --git a/src/routes/load/components/Layout.jsx b/src/routes/load/components/Layout.jsx index 0fa0a213..6e9ab43b 100644 --- a/src/routes/load/components/Layout.jsx +++ b/src/routes/load/components/Layout.jsx @@ -2,7 +2,7 @@ import * as React from 'react' import ChevronLeft from '@material-ui/icons/ChevronLeft' import IconButton from '@material-ui/core/IconButton' -import Stepper from '~/components/Stepper' +import Stepper, { StepperPage } from '~/components/Stepper' import Block from '~/components/layout/Block' import Heading from '~/components/layout/Heading' import Row from '~/components/layout/Row' @@ -46,11 +46,11 @@ const Layout = ({ Load existing Safe - {DetailsForm} - {OwnerList} - + {DetailsForm} + {OwnerList} + {ReviewInformation} - + ) : ( diff --git a/src/routes/open/components/Layout.jsx b/src/routes/open/components/Layout.jsx index 72f5d5a9..663bad9f 100644 --- a/src/routes/open/components/Layout.jsx +++ b/src/routes/open/components/Layout.jsx @@ -2,7 +2,7 @@ import * as React from 'react' import ChevronLeft from '@material-ui/icons/ChevronLeft' import IconButton from '@material-ui/core/IconButton' -import Stepper from '~/components/Stepper' +import Stepper, { StepperPage } from '~/components/Stepper' import Block from '~/components/layout/Block' import Heading from '~/components/layout/Heading' import Row from '~/components/layout/Row' @@ -60,9 +60,9 @@ const Layout = ({ initialValues={initialValues} testId="create-safe-form" > - {SafeNameField} - {SafeOwnersFields} - {Review} + {SafeNameField} + {SafeOwnersFields} + {Review} ) : ( diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx b/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx index d57af2c5..ca168489 100644 --- a/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx @@ -15,7 +15,9 @@ import Button from '~/components/layout/Button' import Row from '~/components/layout/Row' import Img from '~/components/layout/Img' import Col from '~/components/layout/Col' -import { FIELD_CONFIRMATIONS, getOwnerNameBy, getOwnerAddressBy, getNumOwnersFrom } from '~/routes/open/components/fields' +import { + FIELD_CONFIRMATIONS, getOwnerNameBy, getOwnerAddressBy, getNumOwnersFrom, +} from '~/routes/open/components/fields' import Paragraph from '~/components/layout/Paragraph' import OpenPaper from '~/components/Stepper/OpenPaper' import { getAccountsFrom } from '~/routes/open/utils/safeDataExtractor' @@ -183,8 +185,8 @@ const SafeOwnersPage = ({ updateInitialProps }: Object) => (controls: React.Node errors={errors} updateInitialProps={updateInitialProps} values={values} - /> - {console.log('vals one level up', values)} + /> + {console.log('vals one level up', values)} ) diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/validators.js b/src/routes/open/components/SafeOwnersConfirmationsForm/validators.js index c2e8e8fb..97f877d7 100644 --- a/src/routes/open/components/SafeOwnersConfirmationsForm/validators.js +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/validators.js @@ -14,4 +14,4 @@ export const getAddressValidators = (addresses: string[], position: number) => { copy.pop() return composeValidators(required, mustBeEthereumAddress, uniqueAddress(copy)) -} \ No newline at end of file +} diff --git a/src/routes/safe/components/SendToken/ReviewTx/index.jsx b/src/routes/safe/components/SendToken/ReviewTx/index.jsx deleted file mode 100644 index e2a41932..00000000 --- a/src/routes/safe/components/SendToken/ReviewTx/index.jsx +++ /dev/null @@ -1,39 +0,0 @@ -// @flow -import * as React from 'react' -import CircularProgress from '@material-ui/core/CircularProgress' -import Block from '~/components/layout/Block' -import Bold from '~/components/layout/Bold' -import OpenPaper from '~/components/Stepper/OpenPaper' -import Heading from '~/components/layout/Heading' -import Paragraph from '~/components/layout/Paragraph' -import { TKN_DESTINATION_PARAM, TKN_VALUE_PARAM } from '~/routes/safe/components/SendToken/SendTokenForm/index' - -type FormProps = { - values: Object, - submitting: boolean, -} - -type Props = { - symbol: string, -} - -const spinnerStyle = { - minHeight: '50px', -} - -const ReviewTx = ({ symbol }: Props) => (controls: React.Node, { values, submitting }: FormProps) => ( - - Review the move token funds - - Destination: - {' '} - {values[TKN_DESTINATION_PARAM]} - - - {`Amount to transfer: ${values[TKN_VALUE_PARAM]} ${symbol}`} - - {submitting && } - -) - -export default ReviewTx diff --git a/src/routes/safe/components/SendToken/SendTokenForm/index.jsx b/src/routes/safe/components/SendToken/SendTokenForm/index.jsx deleted file mode 100644 index 1095a7fe..00000000 --- a/src/routes/safe/components/SendToken/SendTokenForm/index.jsx +++ /dev/null @@ -1,53 +0,0 @@ -// @flow -import * as React from 'react' -import Field from '~/components/forms/Field' -import TextField from '~/components/forms/TextField' -import { - composeValidators, inLimit, mustBeFloat, required, greaterThan, mustBeEthereumAddress, -} from '~/components/forms/validator' -import Block from '~/components/layout/Block' -import OpenPaper from '~/components/Stepper/OpenPaper' -import Heading from '~/components/layout/Heading' - -export const CONFIRMATIONS_ERROR = 'Number of confirmations can not be higher than the number of owners' - -export const TKN_DESTINATION_PARAM = 'tknDestination' -export const TKN_VALUE_PARAM = 'tknValue' - -type Props = { - funds: string, - symbol: string, -} - -const SendTokenForm = ({ funds, symbol }: Props) => (controls: React.Node) => ( - - - Send tokens Transaction - - - {`Available tokens: ${funds} ${symbol}`} - - - - - - - - -) - -export default SendTokenForm diff --git a/src/routes/safe/components/SendToken/actions.js b/src/routes/safe/components/SendToken/actions.js deleted file mode 100644 index 681ad469..00000000 --- a/src/routes/safe/components/SendToken/actions.js +++ /dev/null @@ -1,10 +0,0 @@ -// @flow -import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' - -export type Actions = { - fetchTransactions: typeof fetchTransactions, -} - -export default { - fetchTransactions, -} diff --git a/src/routes/safe/components/SendToken/index.jsx b/src/routes/safe/components/SendToken/index.jsx deleted file mode 100644 index 84899436..00000000 --- a/src/routes/safe/components/SendToken/index.jsx +++ /dev/null @@ -1,119 +0,0 @@ -// @flow -import * as React from 'react' -import { BigNumber } from 'bignumber.js' -import { connect } from 'react-redux' -import Stepper from '~/components/Stepper' -import { sleep } from '~/utils/timer' -import { type Safe } from '~/routes/safe/store/models/safe' -import { getStandardTokenContract } from '~/logic/tokens/store/actions/fetchTokens' -import { type Token } from '~/logic/tokens/store/model/token' -import { isEther } from '~/logic/tokens/utils/tokenHelpers' -import { EMPTY_DATA } from '~/logic/wallets/ethTransactions' -import { toNative } from '~/logic/wallets/tokens' -import { createTransaction } from '~/logic/safe/safeFrontendOperations' -import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' -import actions, { type Actions } from './actions' -import selector, { type SelectorProps } from './selector' -import SendTokenForm, { TKN_DESTINATION_PARAM, TKN_VALUE_PARAM } from './SendTokenForm' -import ReviewTx from './ReviewTx' - -const getSteps = () => ['Fill Move Token form', 'Review Move Token form'] - -type Props = SelectorProps & - Actions & { - safe: Safe, - token: Token, - onReset: () => void, - } - -type State = { - done: boolean, -} - -export const SEE_TXS_BUTTON_TEXT = 'VISIT TXS' - -const getTransferData = async (tokenAddress: string, to: string, amount: BigNumber) => { - const StandardToken = await getStandardTokenContract() - const myToken = await StandardToken.at(tokenAddress) - - return myToken.contract.transfer(to, amount).encodeABI() -} - -const processTokenTransfer = async (safe: Safe, token: Token, to: string, amount: string, userAddress: string) => { - const safeAddress = safe.get('address') - const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) - const nonce = await gnosisSafe.nonce() - const symbol = token.get('symbol') - const name = `Send ${amount} ${symbol} to ${to}` - const value = isEther(symbol) ? amount : '0' - const tokenAddress = token.get('address') - const destination = isEther(symbol) ? to : tokenAddress - const data = isEther(symbol) - ? EMPTY_DATA - : await getTransferData(tokenAddress, to, toNative(amount, token.get('decimals'))) - - return createTransaction(safe, name, destination, value, nonce, userAddress, data) -} - -class SendToken extends React.Component { - state = { - done: false, - } - - onTransaction = async (values: Object) => { - try { - const { - safe, token, userAddress, fetchTransactions, - } = this.props - - const amount = values[TKN_VALUE_PARAM] - const destination = values[TKN_DESTINATION_PARAM] - - await processTokenTransfer(safe, token, destination, amount, userAddress) - await sleep(1500) - fetchTransactions(safe.get('address')) - this.setState({ done: true }) - } catch (error) { - this.setState({ done: false }) - // eslint-disable-next-line - console.log('Error while moving ERC20 token funds ' + error) - } - } - - onReset = () => { - const { onReset } = this.props - - this.setState({ done: false }) - onReset() // This is for show the TX list component - } - - render() { - const { done } = this.state - const { token } = this.props - const steps = getSteps() - const finishedButton = - const symbol = token.get('symbol') - - return ( - - - - {SendTokenForm} - - {ReviewTx} - - - ) - } -} - -export default connect( - selector, - actions, -)(SendToken) diff --git a/src/routes/safe/components/SendToken/selector.js b/src/routes/safe/components/SendToken/selector.js deleted file mode 100644 index 8701f74b..00000000 --- a/src/routes/safe/components/SendToken/selector.js +++ /dev/null @@ -1,11 +0,0 @@ -// @flow -import { createStructuredSelector } from 'reselect' -import { userAccountSelector } from '~/logic/wallets/store/selectors' - -export type SelectorProps = { - userAddress: typeof userAccountSelector, -} - -export default createStructuredSelector({ - userAddress: userAccountSelector, -}) diff --git a/src/routes/safe/components/Threshold/Review/index.jsx b/src/routes/safe/components/Threshold/Review/index.jsx deleted file mode 100644 index 459ca795..00000000 --- a/src/routes/safe/components/Threshold/Review/index.jsx +++ /dev/null @@ -1,34 +0,0 @@ -// @flow -import * as React from 'react' -import CircularProgress from '@material-ui/core/CircularProgress' -import Block from '~/components/layout/Block' -import Bold from '~/components/layout/Bold' -import OpenPaper from '~/components/Stepper/OpenPaper' -import Heading from '~/components/layout/Heading' -import Paragraph from '~/components/layout/Paragraph' -import { THRESHOLD_PARAM } from '~/routes/safe/components/Threshold/ThresholdForm' - -type FormProps = { - values: Object, - submitting: boolean, -} - -const spinnerStyle = { - minHeight: '50px', -} - -const Review = () => (controls: React.Node, { values, submitting }: FormProps) => ( - - Review the Threshold operation - - The new threshold will be: - {' '} - {values[THRESHOLD_PARAM]} - - - { submitting && } - - -) - -export default Review diff --git a/src/routes/safe/components/Threshold/ThresholdForm/index.jsx b/src/routes/safe/components/Threshold/ThresholdForm/index.jsx deleted file mode 100644 index 9c6b14b5..00000000 --- a/src/routes/safe/components/Threshold/ThresholdForm/index.jsx +++ /dev/null @@ -1,46 +0,0 @@ -// @flow -import * as React from 'react' -import Block from '~/components/layout/Block' -import Heading from '~/components/layout/Heading' -import OpenPaper from '~/components/Stepper/OpenPaper' -import Field from '~/components/forms/Field' -import TextField from '~/components/forms/TextField' -import { - composeValidators, minValue, maxValue, mustBeInteger, required, -} from '~/components/forms/validator' -import { type Safe } from '~/routes/safe/store/models/safe' - -export const THRESHOLD_PARAM = 'threshold' - -type ThresholdProps = { - numOwners: number, - safe: Safe, -} - -const ThresholdForm = ({ numOwners, safe }: ThresholdProps) => (controls: React.Node) => ( - - - {'Change safe\'s threshold'} - - - {`Safe's owners: ${numOwners} and Safe's threshold: ${safe.get('threshold')}`} - - - - - -) - -export default ThresholdForm diff --git a/src/routes/safe/components/Threshold/actions.js b/src/routes/safe/components/Threshold/actions.js deleted file mode 100644 index 681ad469..00000000 --- a/src/routes/safe/components/Threshold/actions.js +++ /dev/null @@ -1,10 +0,0 @@ -// @flow -import fetchTransactions from '~/routes/safe/store/actions/fetchTransactions' - -export type Actions = { - fetchTransactions: typeof fetchTransactions, -} - -export default { - fetchTransactions, -} diff --git a/src/routes/safe/components/Threshold/index.jsx b/src/routes/safe/components/Threshold/index.jsx deleted file mode 100644 index 1f698aa2..00000000 --- a/src/routes/safe/components/Threshold/index.jsx +++ /dev/null @@ -1,86 +0,0 @@ -// @flow -import * as React from 'react' -import Stepper from '~/components/Stepper' -import { connect } from 'react-redux' -import { createTransaction } from '~/logic/safe/safeFrontendOperations' -import { getGnosisSafeInstanceAt } from '~/logic/contracts/safeContracts' -import { type Safe } from '~/routes/safe/store/models/safe' -import ThresholdForm, { THRESHOLD_PARAM } from './ThresholdForm' -import selector, { type SelectorProps } from './selector' -import actions, { type Actions } from './actions' -import Review from './Review' - -type Props = SelectorProps & Actions & { - numOwners: number, - safe: Safe, - onReset: () => void, -} - -const getSteps = () => [ - 'Fill Change threshold Form', 'Review change threshold operation', -] - -type State = { - done: boolean, -} - -export const CHANGE_THRESHOLD_RESET_BUTTON_TEXT = 'SEE TXs' - -class Threshold extends React.PureComponent { - state = { - done: false, - } - - onThreshold = async (values: Object) => { - try { - const { safe, userAddress, fetchTransactions } = this.props // , fetchThreshold } = this.props - const newThreshold = values[THRESHOLD_PARAM] - const safeAddress = safe.get('address') - const gnosisSafe = await getGnosisSafeInstanceAt(safeAddress) - const nonce = await gnosisSafe.nonce() - const data = gnosisSafe.contract.changeThreshold(newThreshold).encodeABI() - await createTransaction(safe, `Change Safe's threshold [${nonce}]`, safeAddress, '0', nonce, userAddress, data) - await fetchTransactions(safeAddress) - this.setState({ done: true }) - } catch (error) { - this.setState({ done: false }) - // eslint-disable-next-line - console.log('Error while changing threshold ' + error) - } - } - - onReset = () => { - const { onReset } = this.props - this.setState({ done: false }) - - onReset() - } - - render() { - const { numOwners, safe } = this.props - const { done } = this.state - const steps = getSteps() - const finishedButton = - - return ( - - - - { ThresholdForm } - - - { Review } - - - - ) - } -} - -export default connect(selector, actions)(Threshold) diff --git a/src/routes/safe/components/Threshold/selector.js b/src/routes/safe/components/Threshold/selector.js deleted file mode 100644 index 8701f74b..00000000 --- a/src/routes/safe/components/Threshold/selector.js +++ /dev/null @@ -1,11 +0,0 @@ -// @flow -import { createStructuredSelector } from 'reselect' -import { userAccountSelector } from '~/logic/wallets/store/selectors' - -export type SelectorProps = { - userAddress: typeof userAccountSelector, -} - -export default createStructuredSelector({ - userAddress: userAccountSelector, -}) From ca13a00d19eee4d0504c27c7f91dec623e18795c Mon Sep 17 00:00:00 2001 From: mmv Date: Thu, 18 Jul 2019 19:06:59 +0400 Subject: [PATCH 04/14] reset form when the only owner left is initial one --- src/components/Stepper/index.jsx | 1 + src/components/forms/GnoForm/index.jsx | 1 - .../SafeOwnersConfirmationsForm/index.jsx | 23 ++++++++++++------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/components/Stepper/index.jsx b/src/components/Stepper/index.jsx index 9c69ec5e..dcca07cf 100644 --- a/src/components/Stepper/index.jsx +++ b/src/components/Stepper/index.jsx @@ -112,6 +112,7 @@ const GnoStepper = (props: Props) => { steps, children, classes, disabledWhenValidating = false, testId, } = props const activePage = getActivePageFrom(children) + const lastPage = isLastPage(page) const penultimate = isLastPage(page + 1) diff --git a/src/components/forms/GnoForm/index.jsx b/src/components/forms/GnoForm/index.jsx index 5adb9c23..d3d690db 100644 --- a/src/components/forms/GnoForm/index.jsx +++ b/src/components/forms/GnoForm/index.jsx @@ -36,7 +36,6 @@ const GnoForm = ({ render={({ handleSubmit, ...rest }) => (
{children(rest.submitting, rest.validating, rest, rest.form.mutators)} - {console.log({ rest })}
)} /> diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx b/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx index ca168489..3b93fa5e 100644 --- a/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx @@ -16,7 +16,10 @@ import Row from '~/components/layout/Row' import Img from '~/components/layout/Img' import Col from '~/components/layout/Col' import { - FIELD_CONFIRMATIONS, getOwnerNameBy, getOwnerAddressBy, getNumOwnersFrom, + FIELD_CONFIRMATIONS, + getOwnerNameBy, + getOwnerAddressBy, + getNumOwnersFrom, } from '~/routes/open/components/fields' import Paragraph from '~/components/layout/Paragraph' import OpenPaper from '~/components/Stepper/OpenPaper' @@ -30,6 +33,7 @@ type Props = { classes: Object, otherAccounts: string[], errors: Object, + form: Object, values: Object, updateInitialProps: (initialValues: Object) => void, } @@ -66,13 +70,16 @@ const SafeOwners = (props: Props) => { const validOwners = getNumOwnersFrom(values) const onRemoveRow = (index: number) => () => { - const initialValues = calculateValuesAfterRemoving(index, numOwners, values) - console.log({ initialValues }) - updateInitialProps(initialValues) + if (numOwners === 2) { + const { form } = props + form.reset() + } else { + const initialValues = calculateValuesAfterRemoving(index, numOwners, values) + updateInitialProps(initialValues) + } setNumOwners(numOwners - 1) } - console.log('values in form', { values }) const onAddOwner = () => { setNumOwners(numOwners + 1) @@ -166,7 +173,7 @@ const SafeOwners = (props: Props) => { {' '} {validOwners} {' '} - owner(s) +owner(s) @@ -177,16 +184,16 @@ const SafeOwners = (props: Props) => { const SafeOwnersForm = withStyles(styles)(SafeOwners) -const SafeOwnersPage = ({ updateInitialProps }: Object) => (controls: React.Node, { values, errors }: Object) => ( +const SafeOwnersPage = ({ updateInitialProps }: Object) => (controls: React.Node, { values, errors, form }: Object) => ( - {console.log('vals one level up', values)} ) From c7f355de04ceed5d0ceb21117c9af90460bd4f85 Mon Sep 17 00:00:00 2001 From: mmv Date: Thu, 18 Jul 2019 19:55:46 +0400 Subject: [PATCH 05/14] fix create safe test --- src/test/safe.dom.create.test.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/test/safe.dom.create.test.js b/src/test/safe.dom.create.test.js index 971c9485..22f5d2d9 100644 --- a/src/test/safe.dom.create.test.js +++ b/src/test/safe.dom.create.test.js @@ -4,7 +4,7 @@ import { type Store } from 'redux' import { render, fireEvent, cleanup } from '@testing-library/react' import { Provider } from 'react-redux' import { ConnectedRouter } from 'connected-react-router' -import { ADD_OWNER_BUTTON } from '~/routes/open/components/SafeOwnersForm' +import { ADD_OWNER_BUTTON } from '~/routes/open/components/SafeOwnersConfirmationsForm' import Open from '~/routes/open/container/Open' import { aNewStore, history, type GlobalState } from '~/store' import { sleep } from '~/utils/timer' @@ -80,14 +80,12 @@ const deploySafe = async (createSafeForm: any, threshold: number, numOwners: num fireEvent.change(ownerNameInput, { target: { value: `Owner ${i + 1}` } }) fireEvent.change(ownerAddressInput, { target: { value: accounts[i] } }) } - fireEvent.submit(form) - await sleep(600) // Fill Threshold // The test is fragile here, MUI select btn is hard to find - const thresholdSelect = createSafeForm.getAllByRole('button')[1] - + const thresholdSelect = createSafeForm.getAllByRole('button')[2] fireEvent.click(thresholdSelect) + const thresholdOptions = createSafeForm.getAllByRole('option') fireEvent.click(thresholdOptions[numOwners - 1]) fireEvent.submit(form) From d882f17d7da3e895a8eea7bf005be8eb585f58c6 Mon Sep 17 00:00:00 2001 From: mmv Date: Fri, 19 Jul 2019 16:48:16 +0400 Subject: [PATCH 06/14] add qrcode scanner component, logic wip --- package.json | 17 +- src/assets/icons/qrcode.svg | 26 + src/components/layout/Block/index.jsx | 4 +- .../ScanQRModal/index.jsx | 139 ++++ .../ScanQRModal/style.js | 0 .../ScanQRModal/utils.js | 15 + .../SafeOwnersConfirmationsForm/index.jsx | 16 +- .../SafeOwnersConfirmationsForm/style.js | 5 +- .../components/Balances/Receive/index.jsx | 2 +- yarn.lock | 714 ++++++------------ 10 files changed, 439 insertions(+), 499 deletions(-) create mode 100644 src/assets/icons/qrcode.svg create mode 100644 src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/index.jsx create mode 100644 src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/style.js create mode 100644 src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/utils.js diff --git a/package.json b/package.json index 8ecd8511..aa3ddc2c 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "react-final-form-listeners": "^1.0.2", "react-hot-loader": "4.12.8", "react-infinite-scroll-component": "^4.5.2", + "react-qr-reader": "^2.2.1", "react-redux": "7.1.0", "react-router-dom": "^4.3.1", "recompose": "^0.30.0", @@ -104,17 +105,17 @@ "classnames": "^2.2.5", "css-loader": "3.1.0", "detect-port": "^1.2.2", - "eslint": "6.0.1", + "eslint": "5.16.0", "eslint-config-airbnb": "17.1.1", - "eslint-plugin-flowtype": "3.11.1", - "eslint-plugin-import": "2.18.0", - "eslint-plugin-jest": "22.10.0", + "eslint-plugin-flowtype": "3.12.1", + "eslint-plugin-import": "2.18.1", + "eslint-plugin-jest": "22.11.1", "eslint-plugin-jsx-a11y": "6.2.3", "eslint-plugin-react": "7.14.2", "ethereumjs-abi": "^0.6.7", "extract-text-webpack-plugin": "^4.0.0-beta.0", "file-loader": "4.1.0", - "flow-bin": "0.102.0", + "flow-bin": "0.103.0", "fs-extra": "8.1.0", "html-loader": "^0.5.5", "html-webpack-plugin": "^3.0.4", @@ -131,9 +132,9 @@ "storybook-host": "5.1.0", "storybook-router": "^0.3.3", "style-loader": "^0.23.1", - "truffle": "5.0.27", - "truffle-contract": "4.0.24", - "truffle-solidity-loader": "0.1.26", + "truffle": "5.0.28", + "truffle-contract": "4.0.25", + "truffle-solidity-loader": "0.1.27", "uglifyjs-webpack-plugin": "2.1.3", "webpack": "4.36.1", "webpack-bundle-analyzer": "3.3.2", diff --git a/src/assets/icons/qrcode.svg b/src/assets/icons/qrcode.svg new file mode 100644 index 00000000..59b5d707 --- /dev/null +++ b/src/assets/icons/qrcode.svg @@ -0,0 +1,26 @@ + + + + Group + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/layout/Block/index.jsx b/src/components/layout/Block/index.jsx index d56d9cbc..e1aced02 100644 --- a/src/components/layout/Block/index.jsx +++ b/src/components/layout/Block/index.jsx @@ -1,10 +1,12 @@ // @flow import classNames from 'classnames/bind' -import React, { PureComponent } from 'react' +import * as React from 'react' import { capitalize } from '~/utils/css' import { type Size } from '~/theme/size' import styles from './index.scss' +const { PureComponent } = React + const cx = classNames.bind(styles) type Props = { diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/index.jsx b/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/index.jsx new file mode 100644 index 00000000..e6dffc71 --- /dev/null +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/index.jsx @@ -0,0 +1,139 @@ +// @flow +import * as React from 'react' +import QrReader from 'react-qr-reader' +import { withStyles } from '@material-ui/core/styles' +import Close from '@material-ui/icons/Close' +import IconButton from '@material-ui/core/IconButton' +import CircularProgress from '@material-ui/core/CircularProgress' +import Paragraph from '~/components/layout/Paragraph' +import Button from '~/components/layout/Button' +import Block from '~/components/layout/Block' +import Row from '~/components/layout/Row' +import Hairline from '~/components/layout/Hairline' +import Col from '~/components/layout/Col' +import Modal from '~/components/Modal' +import { lg, sm, background } from '~/theme/variables' +import { checkWebcam } from './utils' + +const { useEffect, useState } = React + +const styles = () => ({ + heading: { + padding: `${sm} ${lg}`, + justifyContent: 'space-between', + maxHeight: '75px', + boxSizing: 'border-box', + }, + loaderContainer: { + width: '100%', + height: '100%', + }, + manage: { + fontSize: '24px', + }, + close: { + height: '35px', + width: '35px', + }, + detailsContainer: { + backgroundColor: background, + maxHeight: '420px', + }, + buttonRow: { + height: '84px', + justifyContent: 'center', + }, + button: { + '&:last-child': { + marginLeft: sm, + } + }, +}) + +type Props = { + onClose: () => void, + classes: Object, + isOpen: boolean, +} + +const ScanQRModal = ({ classes, onClose, isOpen }: Props) => { + const [hasWebcam, setHasWebcam] = useState(null) + const scannerRef = React.createRef() + const openImageDialog = () => { + scannerRef.current.openImageDialog() + } + + useEffect(() => { + checkWebcam( + () => { + setHasWebcam(true) + }, + () => { + setHasWebcam(false) + }, + ) + }, []) + + useEffect(() => { + if (hasWebcam === false) { + openImageDialog() + } + }, [hasWebcam]) + + return ( + + + + Scan QR + + + + + + + + {hasWebcam === null ? ( + + + + ) : ( + { + if (data) console.log(data) + }} + onError={(err) => { + console.error(err) + }} + style={{ width: '400px', height: '400px' }} + /> + )} + + + + + + + + ) +} + +export default withStyles(styles)(ScanQRModal) diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/style.js b/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/style.js new file mode 100644 index 00000000..e69de29b diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/utils.js b/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/utils.js new file mode 100644 index 00000000..50bdc089 --- /dev/null +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/utils.js @@ -0,0 +1,15 @@ +// @flow +navigator.getMedia = navigator.getUserMedia // use the proper vendor prefix + || navigator.webkitGetUserMedia + || navigator.mozGetUserMedia + || navigator.msGetUserMedia + +export const checkWebcam = (success: Function, err: Function) => navigator.getMedia( + { video: true }, + () => { + success() + }, + () => { + err() + }, +) diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx b/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx index 3b93fa5e..d99bd092 100644 --- a/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx @@ -26,6 +26,8 @@ import OpenPaper from '~/components/Stepper/OpenPaper' import { getAccountsFrom } from '~/routes/open/utils/safeDataExtractor' import Hairline from '~/components/layout/Hairline' import trash from '~/assets/icons/trash.svg' +import QRIcon from '~/assets/icons/qrcode.svg' +import ScanQRModal from './ScanQRModal' import { getAddressValidators } from './validators' import { styles } from './style' @@ -67,8 +69,16 @@ const SafeOwners = (props: Props) => { classes, errors, otherAccounts, values, updateInitialProps, } = props const [numOwners, setNumOwners] = useState(1) + const [qrModalOpen, setQrModalOpen] = useState(false) const validOwners = getNumOwnersFrom(values) + const openQrModal = () => { + setQrModalOpen(true) + } + const closeQrModal = () => { + setQrModalOpen(false) + } + const onRemoveRow = (index: number) => () => { if (numOwners === 2) { const { form } = props @@ -115,7 +125,7 @@ const SafeOwners = (props: Props) => { text="Owner Name" /> - + { text="Owner Address" /> + + Scan QR + {index > 0 && Delete} @@ -178,6 +191,7 @@ owner(s) + {qrModalOpen && } ) } diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/style.js b/src/routes/open/components/SafeOwnersConfirmationsForm/style.js index 936e298b..600a4b72 100644 --- a/src/routes/open/components/SafeOwnersConfirmationsForm/style.js +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/style.js @@ -10,6 +10,10 @@ export const styles = () => ({ }, owner: { padding: `0 ${lg}`, + marginTop: '12px', + '&:first-child': { + marginTop: 0, + }, }, header: { padding: `${sm} ${lg}`, @@ -29,7 +33,6 @@ export const styles = () => ({ }, remove: { height: '56px', - marginTop: '12px', maxWidth: '50px', '&:hover': { cursor: 'pointer', diff --git a/src/routes/safe/components/Balances/Receive/index.jsx b/src/routes/safe/components/Balances/Receive/index.jsx index 841f6f2a..50c3300a 100644 --- a/src/routes/safe/components/Balances/Receive/index.jsx +++ b/src/routes/safe/components/Balances/Receive/index.jsx @@ -4,8 +4,8 @@ import { withStyles } from '@material-ui/core/styles' import Close from '@material-ui/icons/Close' import IconButton from '@material-ui/core/IconButton' import OpenInNew from '@material-ui/icons/OpenInNew' -import Link from '~/components/layout/Link' import QRCode from 'qrcode.react' +import Link from '~/components/layout/Link' import Paragraph from '~/components/layout/Paragraph' import Identicon from '~/components/Identicon' import Button from '~/components/layout/Button' diff --git a/yarn.lock b/yarn.lock index 24df1b98..8f0068e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,14 +19,14 @@ optionalDependencies: chokidar "^2.0.4" -"@babel/code-frame@7.0.0", "@babel/code-frame@^7.0.0": +"@babel/code-frame@7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== dependencies: "@babel/highlight" "^7.0.0" -"@babel/code-frame@^7.5.5": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== @@ -53,7 +53,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@7.5.5": +"@babel/core@7.5.5", "@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.4.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.5.5.tgz#17b2686ef0d6bc58f963dddd68ab669755582c30" integrity sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg== @@ -73,38 +73,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.4.5": - version "7.5.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.5.4.tgz#4c32df7ad5a58e9ea27ad025c11276324e0b4ddd" - integrity sha512-+DaeBEpYq6b2+ZmHx3tHspC+ZRflrvLqwfv8E3hNr5LVQoyBnL8RPKSBCg+rK2W2My9PWlujBiqd0ZPsR9Q6zQ== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.5.0" - "@babel/helpers" "^7.5.4" - "@babel/parser" "^7.5.0" - "@babel/template" "^7.4.4" - "@babel/traverse" "^7.5.0" - "@babel/types" "^7.5.0" - convert-source-map "^1.1.0" - debug "^4.1.0" - json5 "^2.1.0" - lodash "^4.17.11" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - -"@babel/generator@^7.4.0", "@babel/generator@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.5.0.tgz#f20e4b7a91750ee8b63656073d843d2a736dca4a" - integrity sha512-1TTVrt7J9rcG5PMjvO7VEG3FrEoEJNHxumRq66GemPmzboLWtIjjcJgk8rokuAS7IiRSpgVSu5Vb9lc99iJkOA== - dependencies: - "@babel/types" "^7.5.0" - jsesc "^2.5.1" - lodash "^4.17.11" - source-map "^0.5.0" - trim-right "^1.0.1" - -"@babel/generator@^7.5.5": +"@babel/generator@^7.4.0", "@babel/generator@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.5.5.tgz#873a7f936a3c89491b43536d12245b626664e3cf" integrity sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ== @@ -147,19 +116,7 @@ "@babel/traverse" "^7.4.4" "@babel/types" "^7.4.4" -"@babel/helper-create-class-features-plugin@^7.4.0", "@babel/helper-create-class-features-plugin@^7.4.4", "@babel/helper-create-class-features-plugin@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.5.0.tgz#02edb97f512d44ba23b3227f1bf2ed43454edac5" - integrity sha512-EAoMc3hE5vE5LNhMqDOwB1usHvmRjCDAnH8CD4PVkX9/Yr3W/tcz8xE8QvdZxfsFBDICwZnF2UTHIqslRpvxmA== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-member-expression-to-functions" "^7.0.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.4.4" - "@babel/helper-split-export-declaration" "^7.4.4" - -"@babel/helper-create-class-features-plugin@^7.5.5": +"@babel/helper-create-class-features-plugin@^7.4.0", "@babel/helper-create-class-features-plugin@^7.4.4", "@babel/helper-create-class-features-plugin@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.5.5.tgz#401f302c8ddbc0edd36f7c6b2887d8fa1122e5a4" integrity sha512-ZsxkyYiRA7Bg+ZTRpPvB6AbOFKTFFK4LrvTet8lInm0V468MWCaSYJE+I7v2z2r8KNLtYiV+K5kTCnR7dvyZjg== @@ -171,16 +128,7 @@ "@babel/helper-replace-supers" "^7.5.5" "@babel/helper-split-export-declaration" "^7.4.4" -"@babel/helper-define-map@^7.4.0", "@babel/helper-define-map@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz#6969d1f570b46bdc900d1eba8e5d59c48ba2c12a" - integrity sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/types" "^7.4.4" - lodash "^4.17.11" - -"@babel/helper-define-map@^7.5.5": +"@babel/helper-define-map@^7.4.0", "@babel/helper-define-map@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz#3dec32c2046f37e09b28c93eb0b103fd2a25d369" integrity sha512-fTfxx7i0B5NJqvUOBBGREnrqbTxRh7zinBANpZXAVDlsZxYdclDp467G1sQ8VZYMnAURY3RpBUAgOYT9GfzHBg== @@ -220,13 +168,6 @@ dependencies: "@babel/types" "^7.4.4" -"@babel/helper-member-expression-to-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" - integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg== - dependencies: - "@babel/types" "^7.0.0" - "@babel/helper-member-expression-to-functions@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz#1fb5b8ec4453a93c439ee9fe3aeea4a84b76b590" @@ -242,16 +183,16 @@ "@babel/types" "^7.0.0" "@babel/helper-module-transforms@^7.1.0", "@babel/helper-module-transforms@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz#96115ea42a2f139e619e98ed46df6019b94414b8" - integrity sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.5.5.tgz#f84ff8a09038dcbca1fd4355661a500937165b4a" + integrity sha512-jBeCvETKuJqeiaCdyaheF40aXnnU1+wkSiUs/IQg3tB85up1LyL8x77ClY8qJpuRJUcXQo+ZtdNESmZl4j56Pw== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" "@babel/helper-split-export-declaration" "^7.4.4" "@babel/template" "^7.4.4" - "@babel/types" "^7.4.4" - lodash "^4.17.11" + "@babel/types" "^7.5.5" + lodash "^4.17.13" "@babel/helper-optimise-call-expression@^7.0.0": version "7.0.0" @@ -266,11 +207,11 @@ integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== "@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.4.4.tgz#a47e02bc91fb259d2e6727c2a30013e3ac13c4a2" - integrity sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351" + integrity sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw== dependencies: - lodash "^4.17.11" + lodash "^4.17.13" "@babel/helper-remap-async-to-generator@^7.1.0": version "7.1.0" @@ -283,17 +224,7 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-replace-supers@^7.1.0", "@babel/helper-replace-supers@^7.4.0", "@babel/helper-replace-supers@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz#aee41783ebe4f2d3ab3ae775e1cc6f1a90cefa27" - integrity sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.0.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.4.4" - "@babel/types" "^7.4.4" - -"@babel/helper-replace-supers@^7.5.5": +"@babel/helper-replace-supers@^7.4.0", "@babel/helper-replace-supers@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz#f84ce43df031222d2bad068d2626cb5799c34bc2" integrity sha512-XvRFWrNnlsow2u7jXDuH4jDDctkxbS7gXssrP4q2nUD606ukXHRvydj346wmNg+zAgpFx4MWf4+usfC93bElJg== @@ -328,16 +259,7 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.2.0" -"@babel/helpers@^7.4.3", "@babel/helpers@^7.5.4": - version "7.5.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.5.4.tgz#2f00608aa10d460bde0ccf665d6dcf8477357cf0" - integrity sha512-6LJ6xwUEJP51w0sIgKyfvFMJvIb9mWAfohJp0+m6eHJigkFdcH8duZ1sfhn0ltJRzwUIT/yqqhdSfRpCpL7oow== - dependencies: - "@babel/template" "^7.4.4" - "@babel/traverse" "^7.5.0" - "@babel/types" "^7.5.0" - -"@babel/helpers@^7.5.5": +"@babel/helpers@^7.4.3", "@babel/helpers@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.5.5.tgz#63908d2a73942229d1e6685bc2a0e730dde3b75e" integrity sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g== @@ -355,12 +277,7 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.4.4", "@babel/parser@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.0.tgz#3e0713dff89ad6ae37faec3b29dcfc5c979770b7" - integrity sha512-I5nW8AhGpOXGCCNYGc+p7ExQIBxRFnS2fd/d862bNOKvmoEPjYPcfIjsfdy0ujagYOIYPczKgD9l3FsgTkAzKA== - -"@babel/parser@^7.5.5": +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.4.4", "@babel/parser@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.5.tgz#02f077ac8817d3df4a832ef59de67565e71cca4b" integrity sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g== @@ -382,7 +299,7 @@ "@babel/helper-create-class-features-plugin" "^7.4.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-proposal-class-properties@7.5.5": +"@babel/plugin-proposal-class-properties@7.5.5", "@babel/plugin-proposal-class-properties@^7.3.3": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz#a974cfae1e37c3110e71f3c6a2e48b8e71958cd4" integrity sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A== @@ -390,14 +307,6 @@ "@babel/helper-create-class-features-plugin" "^7.5.5" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-proposal-class-properties@^7.3.3": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.0.tgz#5bc6a0537d286fcb4fd4e89975adbca334987007" - integrity sha512-9L/JfPCT+kShiiTTzcnBJ8cOwdKVmlC1RcCf9F0F9tERVrM4iWtWnXtjWCRqNm2la2BxO1MPArWNsU9zsSJWSQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.5.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-decorators@7.4.0": version "7.4.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.4.0.tgz#8e1bfd83efa54a5f662033afcc2b8e701f4bb3a9" @@ -505,15 +414,7 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" -"@babel/plugin-proposal-object-rest-spread@^7.3.2", "@babel/plugin-proposal-object-rest-spread@^7.4.3", "@babel/plugin-proposal-object-rest-spread@^7.5.4": - version "7.5.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.4.tgz#250de35d867ce8260a31b1fdac6c4fc1baa99331" - integrity sha512-KCx0z3y7y8ipZUMAEEJOyNi11lMb/FOPUjjB113tfowgw0c16EGYos7worCKBcUAh2oG+OBnoUhsnTSoLpV9uA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.2.0" - -"@babel/plugin-proposal-object-rest-spread@^7.5.5": +"@babel/plugin-proposal-object-rest-spread@^7.3.2", "@babel/plugin-proposal-object-rest-spread@^7.4.3", "@babel/plugin-proposal-object-rest-spread@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.5.5.tgz#61939744f71ba76a3ae46b5eea18a54c16d22e58" integrity sha512-F2DxJJSQ7f64FyTVl5cw/9MWn6naXGdk3Q3UhDbFEEHv+EilCPoeRD3Zh/Utx1CJz4uyKlQ4uH+bJPbEhMV7Zw== @@ -732,15 +633,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-block-scoping@^7.4.0", "@babel/plugin-transform-block-scoping@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz#c13279fabf6b916661531841a23c4b7dae29646d" - integrity sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - lodash "^4.17.11" - -"@babel/plugin-transform-block-scoping@^7.5.5": +"@babel/plugin-transform-block-scoping@^7.4.0", "@babel/plugin-transform-block-scoping@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.5.5.tgz#a35f395e5402822f10d2119f6f8e045e3639a2ce" integrity sha512-82A3CLRRdYubkG85lKwhZB0WZoHxLGsJdux/cOVaJCJpvYFl1LVzAIFyRsa7CvXqW8rBM4Zf3Bfn8PHt5DP0Sg== @@ -762,21 +655,7 @@ "@babel/helper-split-export-declaration" "^7.4.0" globals "^11.1.0" -"@babel/plugin-transform-classes@^7.4.3", "@babel/plugin-transform-classes@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz#0ce4094cdafd709721076d3b9c38ad31ca715eb6" - integrity sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-define-map" "^7.4.4" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.4.4" - "@babel/helper-split-export-declaration" "^7.4.4" - globals "^11.1.0" - -"@babel/plugin-transform-classes@^7.5.5": +"@babel/plugin-transform-classes@^7.4.3", "@babel/plugin-transform-classes@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.5.5.tgz#d094299d9bd680a14a2a0edae38305ad60fb4de9" integrity sha512-U2htCNK/6e9K7jGyJ++1p5XRU+LJjrwtoiVn9SzRlDT2KubcZ11OOwy3s24TjHxPgxNwonCYP7U2K51uVYCMDg== @@ -930,15 +809,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-object-super@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" - integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - -"@babel/plugin-transform-object-super@^7.5.5": +"@babel/plugin-transform-object-super@^7.2.0", "@babel/plugin-transform-object-super@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.5.5.tgz#c70021df834073c65eb613b8679cc4a381d1a9f9" integrity sha512-un1zJQAhSosGFBduPgN/YFNvWVpRuHKU7IHBglLoLZsGmruJPOo6pbInneflUdmq7YvSVqhpPs5zdBvLnteltQ== @@ -1072,11 +943,11 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-typescript@^7.3.2": - version "7.5.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.5.2.tgz#ea7da440d29b8ccdb1bd02e18f6cfdc7ce6c16f5" - integrity sha512-r4zJOMbKY5puETm8+cIpaa0RQZG/sSASW1u0pj8qYklcERgVIbxVbP2wyJA7zI1//h7lEagQmXi9IL9iI5rfsA== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.5.5.tgz#6d862766f09b2da1cb1f7d505fe2aedab6b7d4b8" + integrity sha512-pehKf4m640myZu5B2ZviLaiBlxMCjSZ1qTEO459AXKX5GnPueyulJeCqZFs1nz/Ya2dDzXQ1NxZ/kKNWyD4h6w== dependencies: - "@babel/helper-create-class-features-plugin" "^7.5.0" + "@babel/helper-create-class-features-plugin" "^7.5.5" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-typescript" "^7.2.0" @@ -1151,7 +1022,7 @@ js-levenshtein "^1.1.3" semver "^5.5.0" -"@babel/preset-env@7.5.5": +"@babel/preset-env@7.5.5", "@babel/preset-env@^7.4.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.5.5.tgz#bc470b53acaa48df4b8db24a570d6da1fef53c9a" integrity sha512-GMZQka/+INwsMz1A5UEql8tG015h5j/qjptpKY2gJ7giy8ohzU710YciJB5rcKsWGWHiW3RUnHib0E5/m3Tp3A== @@ -1207,62 +1078,6 @@ js-levenshtein "^1.1.3" semver "^5.5.0" -"@babel/preset-env@^7.4.5": - version "7.5.4" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.5.4.tgz#64bc15041a3cbb0798930319917e70fcca57713d" - integrity sha512-hFnFnouyRNiH1rL8YkX1ANCNAUVC8Djwdqfev8i1415tnAG+7hlA5zhZ0Q/3Q5gkop4HioIPbCEWAalqcbxRoQ== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-async-generator-functions" "^7.2.0" - "@babel/plugin-proposal-dynamic-import" "^7.5.0" - "@babel/plugin-proposal-json-strings" "^7.2.0" - "@babel/plugin-proposal-object-rest-spread" "^7.5.4" - "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-syntax-async-generators" "^7.2.0" - "@babel/plugin-syntax-dynamic-import" "^7.2.0" - "@babel/plugin-syntax-json-strings" "^7.2.0" - "@babel/plugin-syntax-object-rest-spread" "^7.2.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" - "@babel/plugin-transform-arrow-functions" "^7.2.0" - "@babel/plugin-transform-async-to-generator" "^7.5.0" - "@babel/plugin-transform-block-scoped-functions" "^7.2.0" - "@babel/plugin-transform-block-scoping" "^7.4.4" - "@babel/plugin-transform-classes" "^7.4.4" - "@babel/plugin-transform-computed-properties" "^7.2.0" - "@babel/plugin-transform-destructuring" "^7.5.0" - "@babel/plugin-transform-dotall-regex" "^7.4.4" - "@babel/plugin-transform-duplicate-keys" "^7.5.0" - "@babel/plugin-transform-exponentiation-operator" "^7.2.0" - "@babel/plugin-transform-for-of" "^7.4.4" - "@babel/plugin-transform-function-name" "^7.4.4" - "@babel/plugin-transform-literals" "^7.2.0" - "@babel/plugin-transform-member-expression-literals" "^7.2.0" - "@babel/plugin-transform-modules-amd" "^7.5.0" - "@babel/plugin-transform-modules-commonjs" "^7.5.0" - "@babel/plugin-transform-modules-systemjs" "^7.5.0" - "@babel/plugin-transform-modules-umd" "^7.2.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.4.5" - "@babel/plugin-transform-new-target" "^7.4.4" - "@babel/plugin-transform-object-super" "^7.2.0" - "@babel/plugin-transform-parameters" "^7.4.4" - "@babel/plugin-transform-property-literals" "^7.2.0" - "@babel/plugin-transform-regenerator" "^7.4.5" - "@babel/plugin-transform-reserved-words" "^7.2.0" - "@babel/plugin-transform-shorthand-properties" "^7.2.0" - "@babel/plugin-transform-spread" "^7.2.0" - "@babel/plugin-transform-sticky-regex" "^7.2.0" - "@babel/plugin-transform-template-literals" "^7.4.4" - "@babel/plugin-transform-typeof-symbol" "^7.2.0" - "@babel/plugin-transform-unicode-regex" "^7.4.4" - "@babel/types" "^7.5.0" - browserslist "^4.6.0" - core-js-compat "^3.1.1" - invariant "^2.2.2" - js-levenshtein "^1.1.3" - semver "^5.5.0" - "@babel/preset-flow@^7.0.0", "@babel/preset-flow@^7.0.0-beta.40": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.0.0.tgz#afd764835d9535ec63d8c7d4caf1c06457263da2" @@ -1291,9 +1106,9 @@ "@babel/plugin-transform-typescript" "^7.3.2" "@babel/runtime-corejs2@^7.2.0": - version "7.5.4" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs2/-/runtime-corejs2-7.5.4.tgz#7111dbb344acce1f7dd601786cff40d516b27a96" - integrity sha512-sHv74OzyZ18d6tjHU0HmlVES3+l+lydkOMTiKsJSTGWcTBpIMfXLEgduahlJrQjknW9RCQAqLIEdLOHjBmq/hg== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs2/-/runtime-corejs2-7.5.5.tgz#c3214c08ef20341af4187f1c9fbdc357fbec96b2" + integrity sha512-FYATQVR00NSNi7mUfpPDp7E8RYMXDuO8gaix7u/w3GekfUinKgX1AcTxs7SoiEmoEW9mbpjrwqWSW6zCmw5h8A== dependencies: core-js "^2.6.5" regenerator-runtime "^0.13.2" @@ -1313,9 +1128,9 @@ regenerator-runtime "^0.13.2" "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.1.5", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.2", "@babel/runtime@^7.4.3", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.1", "@babel/runtime@^7.5.4": - version "7.5.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.4.tgz#cb7d1ad7c6d65676e66b47186577930465b5271b" - integrity sha512-Na84uwyImZZc3FKf4aUF1tysApzwf3p2yuFBIyBfbzT5glzKTdvYI4KVW4kcgjrzoGUjC7w3YyCHcJKaRxsr2Q== + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.5.tgz#74fba56d35efbeca444091c7850ccd494fd2f132" + integrity sha512-28QvEGyQyNkB0/m2B4FU7IEZGK2NUrcMtT6BZEFALTguLk+AUT6ofsHtPk5QyjAdUkpMJ+/Em+quwz4HOt30AQ== dependencies: regenerator-runtime "^0.13.2" @@ -1328,22 +1143,7 @@ "@babel/parser" "^7.4.4" "@babel/types" "^7.4.4" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.0.tgz#4216d6586854ef5c3c4592dab56ec7eb78485485" - integrity sha512-SnA9aLbyOCcnnbQEGwdfBggnc142h/rbqqsXcaATj2hZcegCl903pUD/lfpsNBlBSuWow/YDfRyJuWi2EPR5cg== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.5.0" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/parser" "^7.5.0" - "@babel/types" "^7.5.0" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.11" - -"@babel/traverse@^7.5.5": +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.5.tgz#f664f8f368ed32988cd648da9f72d5ca70f165bb" integrity sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ== @@ -1358,16 +1158,7 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.0.tgz#e47d43840c2e7f9105bc4d3a2c371b4d0c7832ab" - integrity sha512-UFpDVqRABKsW01bvw7/wSUe56uy6RXM5+VJibVVAybDGxEW25jdwiFJEf7ASvSaC7sN7rbE/l3cLp2izav+CtQ== - dependencies: - esutils "^2.0.2" - lodash "^4.17.11" - to-fast-properties "^2.0.0" - -"@babel/types@^7.5.5": +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.5.tgz#97b9f728e182785909aa4ab56264f090a028d18a" integrity sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw== @@ -1728,9 +1519,9 @@ "@babel/runtime" "^7.2.0" "@material-ui/styles@^4.2.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.2.0.tgz#dafb8a271cb6772354aece15d3e43af33844f692" - integrity sha512-VpPCNWYK1KjpurFh1gH02xpAmCqKZrC/rmiBosZcCRDl8AOcUkSxBMNU0rziHgSQ/jYTEh3MdKNs3Gq0vGCQ/w== + version "4.2.1" + resolved "https://registry.yarnpkg.com/@material-ui/styles/-/styles-4.2.1.tgz#b07383ffeaa840bcb6969eb17c5f0e3b734e8e5b" + integrity sha512-1KSOZ17LBWBqIyPRsEpyb4snT/wRIfQTPi0x66UvSzznVK9MPAfJx3/s5lVT4vrGFObs/nj6Pet6Nhrdl2WCrg== dependencies: "@babel/runtime" "^7.2.0" "@emotion/hash" "^0.7.1" @@ -1738,7 +1529,7 @@ "@material-ui/utils" "^4.1.0" clsx "^1.0.2" csstype "^2.5.2" - deepmerge "^3.0.0" + deepmerge "^4.0.0" hoist-non-react-statics "^3.2.1" jss "10.0.0-alpha.17" jss-plugin-camel-case "10.0.0-alpha.17" @@ -1752,12 +1543,12 @@ warning "^4.0.1" "@material-ui/system@^4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@material-ui/system/-/system-4.3.0.tgz#6812049bf9257f8936c5de8f18b7142a67048247" - integrity sha512-VQh3mWZSmzm1JR7Ci35AHKwOhhxHHMrBWCdP4mh7UAwSdjWBE6s2Y9Y0iJiqMoEsHP64vU3W1JpsW2AgkUeHsQ== + version "4.3.1" + resolved "https://registry.yarnpkg.com/@material-ui/system/-/system-4.3.1.tgz#5fe508d4ca94cdf1d76f7fe535413fcc949b23d9" + integrity sha512-Krrc/p/A3rod4M3FYcsWSqE5KxpoyMzYuUHhs0Pns3KH+5kcFyBU+aYbIzMfUz58rhbHkqrShf1fjj7EKcgY0g== dependencies: "@babel/runtime" "^7.2.0" - deepmerge "^3.0.0" + deepmerge "^4.0.0" prop-types "^15.7.2" warning "^4.0.1" @@ -2447,14 +2238,14 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/node@*": - version "12.6.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.6.tgz#831587377c35bb28fa33b6fe5f849a26a3f4a412" - integrity sha512-SMgj3x28MkJyHdWaMv/g/ca3LYDi5gR7O8mX0VKazvFOnmlDXctSEdd/8jfSqozjKFK1R9If1QZWkafX7yQTpA== + version "12.6.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.6.8.tgz#e469b4bf9d1c9832aee4907ba8a051494357c12c" + integrity sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg== "@types/node@^10.12.18", "@types/node@^10.3.2": - version "10.14.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.12.tgz#0eec3155a46e6c4db1f27c3e588a205f767d622f" - integrity sha512-QcAKpaO6nhHLlxWBvpc4WeLrTvPqlHOvaj0s5GriKkA1zq+bsFBPpfYCvQhLqLgYlIko8A9YrPdaMHCo5mBcpg== + version "10.14.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.13.tgz#ac786d623860adf39a3f51d629480aacd6a6eec7" + integrity sha512-yN/FNNW1UYsRR1wwAoyOwqvDuLDtVXnaJTZ898XIw/Q5cCaeVAlVwvsmXLX5PuiScBYwZsZU4JYSHB3TvfdwvQ== "@types/prop-types@*": version "15.7.1" @@ -3271,7 +3062,7 @@ async-eventemitter@^0.2.2, async-eventemitter@^0.2.4: dependencies: async "^2.4.0" -async-limiter@~1.0.0: +async-limiter@^1.0.0, async-limiter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== @@ -6236,11 +6027,6 @@ deep-object-diff@^1.1.0: resolved "https://registry.yarnpkg.com/deep-object-diff/-/deep-object-diff-1.1.0.tgz#d6fabf476c2ed1751fc94d5ca693d2ed8c18bc5a" integrity sha512-b+QLs5vHgS+IoSNcUE4n9HP2NwcHj7aqnJWsjPtuG75Rh5TOaGt0OjAYInh77d5T16V5cRDC+Pw/6ZZZiETBGw== -deepmerge@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.3.0.tgz#d3c47fd6f3a93d517b14426b0628a17b0125f5f7" - integrity sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA== - deepmerge@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.0.0.tgz#3e3110ca29205f120d7cb064960a39c3d2087c09" @@ -6676,9 +6462,9 @@ ejs@^2.6.1: integrity sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q== electron-to-chromium@^1.3.122, electron-to-chromium@^1.3.191, electron-to-chromium@^1.3.47: - version "1.3.193" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.193.tgz#de9b89959288070bffb14557daf8cf9f75b2caf8" - integrity sha512-WX01CG1UoPtTUFaKKwMn+u8nJ63loP6hNxePWtk1pN8ibWMyX1q6TiWPsz1ABBKXezvmaIdtP+0BwzjC1wyCaw== + version "1.3.194" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz#a96452a96d4539131957aade9f634a45721f2819" + integrity sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg== elliptic@6.3.3: version "6.3.3" @@ -6946,17 +6732,17 @@ eslint-module-utils@^2.4.0: debug "^2.6.8" pkg-dir "^2.0.0" -eslint-plugin-flowtype@3.11.1: - version "3.11.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.11.1.tgz#1aae15a10dbcd5aecc89897f810f2e9fcc18a5e3" - integrity sha512-4NiaaGZuz9iEGRTK8j4lkA/scibOXSYaYoHbsTtgLOxxqQCkbWV3xt8ETqILKg7DAYDqB69z1H5U71UmtdF9hw== +eslint-plugin-flowtype@3.12.1: + version "3.12.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.12.1.tgz#b673c716b578c9aa66887feef3bc146f8cbe1c21" + integrity sha512-NZqf5iRgsfHOC31HQdtX2pvzCi0n/j9pB+L7Cf9QtuYxpx0i2wObT+R3rPKhQK4KtEDzGuzPYVf75j4eg+s9ZQ== dependencies: lodash "^4.17.11" -eslint-plugin-import@2.18.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.18.0.tgz#7a5ba8d32622fb35eb9c8db195c2090bd18a3678" - integrity sha512-PZpAEC4gj/6DEMMoU2Df01C5c50r7zdGIN52Yfi7CvvWaYssG7Jt5R9nFG5gmqodxNOz9vQS87xk6Izdtpdrig== +eslint-plugin-import@2.18.1: + version "2.18.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.18.1.tgz#2e4f571d13839543992ad626a18c0edffde9626b" + integrity sha512-YEESFKOcMIXJTosb5YaepqVhQHGMb8dxkgov560GqMDP/658U5vk6FeVSR7xXLeYkPc7xPYy+uAoiYE/bKMphA== dependencies: array-includes "^3.0.3" contains-path "^0.1.0" @@ -6965,15 +6751,15 @@ eslint-plugin-import@2.18.0: eslint-import-resolver-node "^0.3.2" eslint-module-utils "^2.4.0" has "^1.0.3" - lodash "^4.17.11" minimatch "^3.0.4" + object.values "^1.1.0" read-pkg-up "^2.0.0" resolve "^1.11.0" -eslint-plugin-jest@22.10.0: - version "22.10.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.10.0.tgz#a22be77f4dc692808b88ead0059620bda299a97d" - integrity sha512-iBEWJn60Z5bctcjacymUnOQ3xN3gdvGOy3tDHpalAa99r4+jwH0CvICsIIHBNXNlJxuklkbx+wxr49tXk6M0tg== +eslint-plugin-jest@22.11.1: + version "22.11.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.11.1.tgz#04b586e2fddd07e55900a381255d6b3d9242ae87" + integrity sha512-kPF1Nmr5xMLz6DT7qEttz0TTeyx1x6SozIkNO9y4F2yxuWjHMp/e70fo742pR3y0MewgXQQMIIXeSKLB66iO7Q== eslint-plugin-jsx-a11y@6.2.3: version "6.2.3" @@ -7041,49 +6827,7 @@ eslint-visitor-keys@^1.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== -eslint@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.0.1.tgz#4a32181d72cb999d6f54151df7d337131f81cda7" - integrity sha512-DyQRaMmORQ+JsWShYsSg4OPTjY56u1nCjAmICrE8vLWqyLKxhFXOthwMj1SA8xwfrv0CofLNVnqbfyhwCkaO0w== - dependencies: - "@babel/code-frame" "^7.0.0" - ajv "^6.10.0" - chalk "^2.1.0" - cross-spawn "^6.0.5" - debug "^4.0.1" - doctrine "^3.0.0" - eslint-scope "^4.0.3" - eslint-utils "^1.3.1" - eslint-visitor-keys "^1.0.0" - espree "^6.0.0" - esquery "^1.0.1" - esutils "^2.0.2" - file-entry-cache "^5.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^3.1.0" - globals "^11.7.0" - ignore "^4.0.6" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - inquirer "^6.2.2" - is-glob "^4.0.0" - js-yaml "^3.13.1" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.3.0" - lodash "^4.17.11" - minimatch "^3.0.4" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - optionator "^0.8.2" - progress "^2.0.0" - regexpp "^2.0.1" - semver "^5.5.1" - strip-ansi "^4.0.0" - strip-json-comments "^2.0.1" - table "^5.2.3" - text-table "^0.2.0" - -eslint@^5.0.0, eslint@^5.5.0: +eslint@5.16.0, eslint@^5.0.0, eslint@^5.5.0: version "5.16.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== @@ -7142,15 +6886,6 @@ espree@^5.0.1: acorn-jsx "^5.0.0" eslint-visitor-keys "^1.0.0" -espree@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-6.0.0.tgz#716fc1f5a245ef5b9a7fdb1d7b0d3f02322e75f6" - integrity sha512-lJvCS6YbCn3ImT3yKkPe0+tJ+mH6ljhGNjHQH9mRtiO6gjhVAOhVXW1yjnwqGwTkK3bGbye+hb00nFNmu0l/1Q== - dependencies: - acorn "^6.0.7" - acorn-jsx "^5.0.0" - eslint-visitor-keys "^1.0.0" - esprima@^3.1.3, esprima@~3.1.0: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" @@ -8136,10 +7871,10 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== -flow-bin@0.102.0: - version "0.102.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.102.0.tgz#3d5de44bcc26d26585e932b3201988b766f9b380" - integrity sha512-mYon6noeLO0Q5SbiWULLQeM1L96iuXnRtYMd47j3bEWXAwUW9EnwNWcn+cZg/jC/Dg4Wj/jnkdTDEuFtbeu1ww== +flow-bin@0.103.0: + version "0.103.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.103.0.tgz#7aec510d85e1c1b0f2b912bb988337d70035cb0f" + integrity sha512-Y3yrnE5ICN1Kl/y10BwjA3JSuS+gt4jVPNyUNCZb0RqmkdssMrW8QNNysJYvhgAY/JBJH8Qv7NVUf11MiwfSlA== flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: version "1.1.1" @@ -8429,9 +8164,9 @@ fuse.js@^3.4.4: integrity sha512-s9PGTaQIkT69HaeoTVjwGsLfb8V8ScJLx5XGFcKHg0MqLUH/UZ4EKOtqtXX9k7AFqCGxD1aJmYb8Q5VYDibVRQ== ganache-cli@^6.4.2: - version "6.4.5" - resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.4.5.tgz#6aa24c985f73f9b27ceef8b9bcc1c8dabf3018f0" - integrity sha512-YHCE6AglvFShkPbU8iyxHqLxnSC3QdApIEgbuKUBiOPMLwNlINDOOsC8PFkX3oYZwRkuhexwv8olYZTvGoglrQ== + version "6.5.0" + resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.5.0.tgz#5b2198c2931d3f2d3a2e239943a7b7073f9df651" + integrity sha512-z0NAozUg/JFWhisIxYlRLyCoZfO+X2W2ao6BAyCkgwAON1Xvj1n+xSZb8YQm1ShOPQQXFrodsYasYGHwvf+PMQ== dependencies: bn.js "4.11.8" source-map-support "0.5.9" @@ -9233,9 +8968,9 @@ html-webpack-plugin@^3.0.4: util.promisify "1.0.0" html-webpack-plugin@^4.0.0-beta.2: - version "4.0.0-beta.7" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.0.0-beta.7.tgz#8e38391e613e19997e9bdd628c9a384cf6a24faa" - integrity sha512-xtKllnYj6xQPChdvbLihnj3yPsvB4WFASbqyZK2aflWPkDO+NitASYvsRPXPF3u4XYkZ5L7A+WtBh7J0vJ8APQ== + version "4.0.0-beta.8" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.0.0-beta.8.tgz#d9a8d4322d8cf310f1568f6f4f585a80df0ad378" + integrity sha512-n5S2hJi3/vioRvEDswZP2WFgZU8TUqFoYIrkg5dt+xDC4TigQEhIcl4Y81Qs2La/EqKWuJZP8+ikbHGVmzQ4Mg== dependencies: html-minifier "^4.0.0" loader-utils "^1.2.3" @@ -10805,6 +10540,11 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" +jsqr@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/jsqr/-/jsqr-1.2.0.tgz#f93fc65fa7d1ded78b1bcb020fa044352b04261a" + integrity sha512-wKcQS9QC2VHGk7aphWCp1RrFyC0CM6fMgC5prZZ2KV/Lk6OKNoCod9IR6bao+yx3KPY0gZFC5dc+h+KFzCI0Wg== + jss-plugin-camel-case@10.0.0-alpha.17: version "10.0.0-alpha.17" resolved "https://registry.yarnpkg.com/jss-plugin-camel-case/-/jss-plugin-camel-case-10.0.0-alpha.17.tgz#6f7c9d9742e349bb061e53cd9b1c3cb006169a67" @@ -11251,9 +10991,9 @@ locate-path@^5.0.0: p-locate "^4.1.0" lodash-es@^4.17.11, lodash-es@^4.2.1: - version "4.17.14" - resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.14.tgz#12a95a963cc5955683cee3b74e85458954f37ecc" - integrity sha512-7zchRrGa8UZXjD/4ivUWP1867jDkhzTG2c/uj739utSd7O/pFFdxspCemIFKEEjErbcqRzn8nKnGsi7mvTgRPA== + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78" + integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ== lodash.clonedeep@^4.5.0: version "4.5.0" @@ -11336,9 +11076,9 @@ lodash@4.17.11: integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== "lodash@>=3.5 <5", lodash@^4, lodash@^4.0.1, lodash@^4.1.0, lodash@^4.11.2, lodash@^4.15.0, lodash@^4.17.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1: - version "4.17.14" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" - integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== log-symbols@^2.2.0: version "2.2.0" @@ -11681,24 +11421,24 @@ merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: rlp "^2.0.0" semaphore ">=1.0.1" -messageformat-formatters@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/messageformat-formatters/-/messageformat-formatters-2.0.0.tgz#bf4e1c4f924c3e35e070617744a5bbe513303d60" - integrity sha512-0AhoocUMk5CFKvqTubLfR6xKcoYAnbVFEMzXe2oNetLG0zlEHLg+gq4NQ3bBMy6T2qaOJRLjF2ZBT4Wzeof02A== +messageformat-formatters@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/messageformat-formatters/-/messageformat-formatters-2.0.1.tgz#0492c1402a48775f751c9b17c0354e92be012b08" + integrity sha512-E/lQRXhtHwGuiQjI7qxkLp8AHbMD5r2217XNe/SREbBlSawe0lOqsFb7rflZJmlQFSULNLIqlcjjsCPlB3m3Mg== -messageformat-parser@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/messageformat-parser/-/messageformat-parser-4.1.1.tgz#665c70393f7b9b55a666ab27f6503ce0b5beeb1f" - integrity sha512-g5JfN4P58rrx0YVYo4S/tT23cYYm3NNeJLm2F2hhcFq1O1xieVGTssHa1QWMYeHCulTJ/1V7EMkOtItJa9LFUg== +messageformat-parser@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/messageformat-parser/-/messageformat-parser-4.1.2.tgz#fd34ec39912a14868a1595eaeb742485ab8ab372" + integrity sha512-7dWuifeyldz7vhEuL96Kwq1fhZXBW+TUfbnHN4UCrCxoXQTYjHnR78eI66Gk9LaLLsAvzPNVJBaa66DRfFNaiA== messageformat@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/messageformat/-/messageformat-2.2.1.tgz#8afb70bbb2ef43f43c49a7af3e1256847b2a6be0" - integrity sha512-yMeuqLBgmn2IFqy51xKMeuQQYK/SLVX4mqT51VaaVp2bCOEaYs2/4qN5mSnVTvkMdDNvt7YwGw4wpGR0WjeT6A== + version "2.3.0" + resolved "https://registry.yarnpkg.com/messageformat/-/messageformat-2.3.0.tgz#de263c49029d5eae65d7ee25e0754f57f425ad91" + integrity sha512-uTzvsv0lTeQxYI2y1NPa1lItL5VRI8Gb93Y2K2ue5gBPyrbJxfDi/EYWxh2PKv5yO42AJeeqblS9MJSh/IEk4w== dependencies: make-plural "^4.3.0" - messageformat-formatters "^2.0.0" - messageformat-parser "^4.1.1" + messageformat-formatters "^2.0.1" + messageformat-parser "^4.1.2" methods@~1.1.2: version "1.1.2" @@ -13708,9 +13448,9 @@ prop-types@15.7.2, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, react-is "^16.8.1" property-information@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.1.0.tgz#e4755eee5319f03f7f6f5a9bc1a6a7fea6609e2c" - integrity sha512-tODH6R3+SwTkAQckSp2S9xyYX8dEKYkeXw+4TmJzTxnNzd6mQPu1OD4f9zPrvw/Rm4wpPgI+Zp63mNSGNzUgHg== + version "5.2.2" + resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.2.2.tgz#20555eafd2296278a682e5a51d5123e7878ecc30" + integrity sha512-N2moasZmjn2mjVGIWpaqz5qnz6QyeQSGgGvMtl81gA9cPTWa6wpesRSe/quNnOjUHpvSH1oZx0pdz0EEckLFnA== dependencies: xtend "^4.0.1" @@ -14206,6 +13946,15 @@ react-popper@^1.3.3: typed-styles "^0.0.7" warning "^4.0.2" +react-qr-reader@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/react-qr-reader/-/react-qr-reader-2.2.1.tgz#dc89046d1c1a1da837a683dd970de5926817d55b" + integrity sha512-EL5JEj53u2yAOgtpAKAVBzD/SiKWn0Bl7AZy6ZrSf1lub7xHwtaXe6XSx36Wbhl1VMGmvmrwYMRwO1aSCT2fwA== + dependencies: + jsqr "^1.2.0" + prop-types "^15.7.2" + webrtc-adapter "^7.2.1" + react-redux@7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.1.0.tgz#72af7cf490a74acdc516ea9c1dd80e25af9ea0b2" @@ -15053,6 +14802,13 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== +rtcpeerconnection-shim@^1.2.15: + version "1.2.15" + resolved "https://registry.yarnpkg.com/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz#e7cc189a81b435324c4949aa3dfb51888684b243" + integrity sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw== + dependencies: + sdp "^2.6.0" + run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" @@ -15189,9 +14945,9 @@ schema-utils@^1.0.0: ajv-keywords "^3.1.0" schema-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.0.0.tgz#e5bc78a5bff1e771e566b52f6a523b345352a448" - integrity sha512-4JfkJmuT78xkJAZrYivuu6RNfX57ul5u+jsfxwRAdWw5eE1qIY/i4go1A3zAdJlTwYXLbvWHWXVvoYu3PjGf9A== + version "2.0.1" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.0.1.tgz#1eec2e059556af841b7f3a83b61af13d7a3f9196" + integrity sha512-HJFKJ4JixDpRur06QHwi8uu2kZbng318ahWEKgBjc0ZklcE4FDvmm2wghb448q0IRaABxIESt8vqPFvwgMB80A== dependencies: ajv "^6.1.0" ajv-keywords "^3.1.0" @@ -15245,6 +15001,11 @@ scryptsy@^1.2.1: dependencies: pbkdf2 "^3.0.3" +sdp@^2.6.0, sdp@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/sdp/-/sdp-2.9.0.tgz#2eed2d9c0b26c81ff87593107895c68d6fb9a0a6" + integrity sha512-XAVZQO4qsfzVTHorF49zCpkdxiGmPNjA8ps8RcJGtGP3QJ/A8I9/SVg/QnkAFDMXIyGbHZBBFwYBw6WdnhT96w== + seamless-immutable@^7.1.3: version "7.1.4" resolved "https://registry.yarnpkg.com/seamless-immutable/-/seamless-immutable-7.1.4.tgz#6e9536def083ddc4dea0207d722e0e80d0f372f8" @@ -15606,9 +15367,9 @@ snapdragon@^0.8.1: use "^3.1.0" socketcluster-client@^14.2.1: - version "14.2.2" - resolved "https://registry.yarnpkg.com/socketcluster-client/-/socketcluster-client-14.2.2.tgz#60b31318abe6828ba7233f5a9a32540263fd23b6" - integrity sha512-vofmFcTaHaIf+MqAR0OZS7e30X4jxbDPJl+taCe8kLGJ5rVOrKeuU0sGyHyHyqW87AIR6jqc4KODl4WQJ4SsAA== + version "14.3.0" + resolved "https://registry.yarnpkg.com/socketcluster-client/-/socketcluster-client-14.3.0.tgz#de56e90b76f226ff691ec137f1e748d7365124b9" + integrity sha512-ppamWR5N7fa9Lb4+ffOhMA8VMJfaSBWcD3cWCwAQ0wbg5c61LsTrK2rOPEnQ/uuhQzvLkgibEFiHWsUGRWkfNg== dependencies: buffer "^5.2.1" clone "2.1.1" @@ -15619,7 +15380,7 @@ socketcluster-client@^14.2.1: sc-errors "^1.4.1" sc-formatter "^3.0.1" uuid "3.2.1" - ws "5.1.1" + ws "7.1.0" sockjs-client@1.3.0: version "1.3.0" @@ -16634,13 +16395,13 @@ truffle-artifactor@^2.1.2: truffle-contract "^2.0.3" truffle-contract-schema "^0.0.5" -truffle-artifactor@^4.0.23: - version "4.0.23" - resolved "https://registry.yarnpkg.com/truffle-artifactor/-/truffle-artifactor-4.0.23.tgz#b7e88c9e7c11c3d6c8272c5b7a16dcff0a72f031" - integrity sha512-7+5GNOMRJyKr99Fa9P3ULWn6uSrPpu5lQQPqDsQDTWuCGuImhjtbjGbc/3JWFL3k/Za76cWaMUJ764Rm07gEnQ== +truffle-artifactor@^4.0.24: + version "4.0.24" + resolved "https://registry.yarnpkg.com/truffle-artifactor/-/truffle-artifactor-4.0.24.tgz#fec89a0a0b7c7f35074aac8d1f7d324830bff455" + integrity sha512-/dMtCRx70A1rsFPXd7fGAdio34spAYqGRiLzxHGOqIjjD/8UwuEbupY8zC4M9tSBG8GF4pjT1HvPqlT9iY0rwQ== dependencies: fs-extra "6.0.1" - lodash "4.17.11" + lodash "^4.17.13" truffle-contract-schema "^3.0.11" truffle-blockchain-utils@^0.0.10: @@ -16660,10 +16421,10 @@ truffle-blockchain-utils@^0.0.5: resolved "https://registry.yarnpkg.com/truffle-blockchain-utils/-/truffle-blockchain-utils-0.0.5.tgz#a4e5c064dadd69f782a137f3d276d21095da7a47" integrity sha1-pOXAZNrdafeCoTfz0nbSEJXaekc= -truffle-box@^1.0.30: - version "1.0.30" - resolved "https://registry.yarnpkg.com/truffle-box/-/truffle-box-1.0.30.tgz#75f4e987b9847be5d2d852f4f5ed4575ffd67330" - integrity sha512-E8UDB8GQUlJydrJbYjnMwSNKn55DtHRlTgdWKKXtI4ji+3KDYB4zloIQvBPsNLfbDlPdB6lq2lafySg5I+n98A== +truffle-box@^1.0.31: + version "1.0.31" + resolved "https://registry.yarnpkg.com/truffle-box/-/truffle-box-1.0.31.tgz#da47fb2784085cd45c33e896b74029f24a31a0bf" + integrity sha512-COgCOKY+blJDNrVNoHEei4QS2p+fLuQCEBEgM6i53ibtiVB5YF1Ny8QMRu71o6Y01upzKoOdz6K1y1nPRdeISA== dependencies: fs-extra "6.0.1" github-download "^0.5.0" @@ -16671,7 +16432,7 @@ truffle-box@^1.0.30: request "^2.85.0" request-promise-native "^1.0.7" tmp "0.0.33" - truffle-config "^1.1.14" + truffle-config "^1.1.15" vcsurl "^0.1.1" truffle-code-utils@^1.2.4: @@ -16679,21 +16440,21 @@ truffle-code-utils@^1.2.4: resolved "https://registry.yarnpkg.com/truffle-code-utils/-/truffle-code-utils-1.2.4.tgz#19acbc225a5c99081c7aa4bbda122f6fbf2d27e9" integrity sha512-MtIusUMxJeJlOqoqda4DYJ86gqSGDVMGiqhVEVgHL2J5L4plci/uePgYROajklXE9H/g6u7yotnAKOhCdTB9/A== -truffle-compile-vyper@^1.0.21: - version "1.0.21" - resolved "https://registry.yarnpkg.com/truffle-compile-vyper/-/truffle-compile-vyper-1.0.21.tgz#c8bcd2419faeba52d2a928e810df44634867a76a" - integrity sha512-gAYtbFWCxuDkChfdaJIv8uEFTslL01JsTbq4ohqUi+uGaPnJS6ObfU9fz0+Z590dmcCyTeyUcTELsUJO2XcXEQ== +truffle-compile-vyper@^1.0.22: + version "1.0.22" + resolved "https://registry.yarnpkg.com/truffle-compile-vyper/-/truffle-compile-vyper-1.0.22.tgz#6166ffdbdc6e72d30ae42fd1f42e0864ecdb38a8" + integrity sha512-yYXQDPbQnT6DBIK107dQdYhYMlwG5fTOcdyMF6jPcZubpfWnQ5+XptlMyePNhs7w/AdkQEKXKAy702t92yDoiQ== dependencies: async "2.6.1" colors "^1.1.2" eslint "^5.5.0" minimatch "^3.0.4" - truffle-compile "^4.1.4" + truffle-compile "^4.1.5" -truffle-compile@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/truffle-compile/-/truffle-compile-4.1.4.tgz#17a5a5a35fb4d179a73536aff17bd8502671beb6" - integrity sha512-3heMocOSy08HvVMwHzlSGSgD+IMywS68HPaysAxr+3YJ48AFs2i+aTdDCSnBMPfgEGq4EOav9wZmwLDUyGsjfw== +truffle-compile@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/truffle-compile/-/truffle-compile-4.1.5.tgz#b5297405dfd7ec5847144cfd041cb3ef7b164ea3" + integrity sha512-vyecsjOCKJy/v0voDOZJd9Cyk1gQ9HV5E0ssx7pXK8EaaeRI6/C1C6VnKMQBPBNQDN5W0pCcw/TcSDQK5y2DEQ== dependencies: colors "^1.1.2" debug "^4.1.0" @@ -16705,19 +16466,19 @@ truffle-compile@^4.1.4: require-from-string "^2.0.2" semver "^5.6.0" solc "^0.5.0" - truffle-config "^1.1.14" + truffle-config "^1.1.15" truffle-contract-sources "^0.1.5" truffle-error "^0.0.5" truffle-expect "^0.0.9" -truffle-config@^1.0.1, truffle-config@^1.1.14: - version "1.1.14" - resolved "https://registry.yarnpkg.com/truffle-config/-/truffle-config-1.1.14.tgz#537503f3ecbacae38abfbe5847e628077b4d7205" - integrity sha512-LlmmS4V0hdSE64/hFPzn+kfLkkEhZzojRDjENEnjRqWk82c9kCpubjutVmvqqW8xuCRO/NZUBn3e/eHmK+M0qg== +truffle-config@^1.0.1, truffle-config@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/truffle-config/-/truffle-config-1.1.15.tgz#9c4e647f32d7fe78017f6823a81d3048376bc460" + integrity sha512-boLm/g36ytCtwNLaFZ7ZRv7Y1Ar0lCqgUxi2NkWwFeVoIv7V7ew27v8mziztmVvOXSSXowtkZfWNm4HAYVCWIw== dependencies: configstore "^4.0.0" find-up "^2.1.0" - lodash "4.17.11" + lodash "^4.17.13" original-require "1.0.1" truffle-error "^0.0.5" truffle-provider "^0.1.11" @@ -16771,10 +16532,10 @@ truffle-contract@4.0.0-next.0: web3-eth-abi "1.0.0-beta.35" web3-utils "1.0.0-beta.35" -truffle-contract@4.0.24, truffle-contract@^4.0.24: - version "4.0.24" - resolved "https://registry.yarnpkg.com/truffle-contract/-/truffle-contract-4.0.24.tgz#3e50774bb88f7552f2c01bde80fcdae4ccf9fd42" - integrity sha512-Zcv6rr2iMJWtQo+GbSHTtih13rLh3VU1SLMiT7odDd0fNiin2lBlLnJlIU2Xpfh06CP9240LAU2r6H0g81uCAA== +truffle-contract@4.0.25, truffle-contract@^4.0.25: + version "4.0.25" + resolved "https://registry.yarnpkg.com/truffle-contract/-/truffle-contract-4.0.25.tgz#dc58c3ad20a4b1654efc0d55020e3bb8b9adac66" + integrity sha512-ngy+ljTCSs/Arv4/9xUjq6mBdAHvQjFvJGqMcBDoNZSXUdvuW4qmX9gu/cOFEt2hdsBcpt0sx7DrXGlY4O97ww== dependencies: bignumber.js "^7.2.1" ethers "^4.0.0-beta.1" @@ -16797,10 +16558,10 @@ truffle-contract@^2.0.3: truffle-contract-schema "^0.0.5" web3 "^0.20.1" -truffle-core@^5.0.27: - version "5.0.27" - resolved "https://registry.yarnpkg.com/truffle-core/-/truffle-core-5.0.27.tgz#8411391f239ca789618c32891f9c7b829ac4f147" - integrity sha512-0wymOZwrmHjlwgVzrrK7nQ1s0Yi3vdmmGGG8Mz1J7iZPhtXYHS4pA7P1GUjRFZSZVky2OU4jJeJ1Mrt2zeR/7w== +truffle-core@^5.0.28: + version "5.0.28" + resolved "https://registry.yarnpkg.com/truffle-core/-/truffle-core-5.0.28.tgz#0826dac6a5f8c50b498e8e6183bb5f46e8ad4ba8" + integrity sha512-gpoXHvWcDElaH8d8JjCMogJZMtNutpb/7dAhcadZ5Ik4HnPLOVbjFFkMTaH56x3jL4p52NjcktQV3ZmQZ6/rew== dependencies: app-module-path "^2.2.0" async "2.6.1" @@ -16829,26 +16590,26 @@ truffle-core@^5.0.27: source-map-support "^0.5.3" spawn-args "^0.1.0" temp "^0.8.3" - truffle-artifactor "^4.0.23" - truffle-box "^1.0.30" - truffle-compile "^4.1.4" - truffle-config "^1.1.14" - truffle-contract "^4.0.24" + truffle-artifactor "^4.0.24" + truffle-box "^1.0.31" + truffle-compile "^4.1.5" + truffle-config "^1.1.15" + truffle-contract "^4.0.25" truffle-contract-sources "^0.1.5" truffle-debug-utils "^1.0.18" - truffle-debugger "^5.0.19" - truffle-deployer "^3.0.25" + truffle-debugger "^5.0.20" + truffle-deployer "^3.0.26" truffle-error "^0.0.5" truffle-expect "^0.0.9" truffle-init "^1.0.7" truffle-interface-adapter "^0.2.0" - truffle-migrate "^3.0.25" + truffle-migrate "^3.0.26" truffle-provider "^0.1.11" truffle-provisioner "^0.1.5" - truffle-require "^2.0.14" + truffle-require "^2.0.15" truffle-resolver "^5.0.14" truffle-solidity-utils "^1.2.3" - truffle-workflow-compile "^2.0.23" + truffle-workflow-compile "^2.0.24" universal-analytics "^0.4.17" web3 "1.0.0-beta.37" xregexp "^4.2.4" @@ -16863,10 +16624,10 @@ truffle-debug-utils@^1.0.18: debug "^4.1.0" node-dir "0.1.17" -truffle-debugger@^5.0.19: - version "5.0.19" - resolved "https://registry.yarnpkg.com/truffle-debugger/-/truffle-debugger-5.0.19.tgz#7a148d7f1935f48c872e5e94079f48bb60315f45" - integrity sha512-11irAfw/VJJ1VlUP6vloHuOIJw3+h3L54IMi2U9WYhHkFsF6Lx2AVhJbdaW3GBfGJYTZxpok3zRUJSHmRRbvow== +truffle-debugger@^5.0.20: + version "5.0.20" + resolved "https://registry.yarnpkg.com/truffle-debugger/-/truffle-debugger-5.0.20.tgz#d3695738af439993348d69ae4d921dc9842dd160" + integrity sha512-SZuh2+KZjHQmJtBawROaiUPNiahcTL6kqy+50rcCiLC74ivlcSCWrPF83xUwGz+pWFG6jjToJFYv2r9adfB5Yw== dependencies: bn.js "^4.11.8" debug "^4.1.0" @@ -16912,13 +16673,13 @@ truffle-decoder@^3.0.6: utf8 "^3.0.0" web3 "1.0.0-beta.37" -truffle-deployer@^3.0.25: - version "3.0.25" - resolved "https://registry.yarnpkg.com/truffle-deployer/-/truffle-deployer-3.0.25.tgz#224362fa326fb784d9c17b5efc47b104427ff2fc" - integrity sha512-2GCDMI0Rfbl1MUQmdVrHkzh7P+EE/RSBD6NDIPFylYN9ykrFlHuVz8jkEahRMEr34s2XjV1CKkkEirDhUI9Q2A== +truffle-deployer@^3.0.26: + version "3.0.26" + resolved "https://registry.yarnpkg.com/truffle-deployer/-/truffle-deployer-3.0.26.tgz#994ec9ddcb230961aa4b96594e518e2bba024825" + integrity sha512-LKlsh8Q1la/RJaUV72nueV5WNlHmwcd0T9yCCaoxzZI3j2jsT9mAAsJv9TyerSMqm7ti/K7N4K6ivNtB7NLKVQ== dependencies: emittery "^0.4.0" - truffle-contract "^4.0.24" + truffle-contract "^4.0.25" truffle-expect "^0.0.9" truffle-error@^0.0.3: @@ -16978,20 +16739,20 @@ truffle-interface-adapter@^0.2.0: ethers "^4.0.32" web3 "1.0.0-beta.37" -truffle-migrate@^3.0.25: - version "3.0.25" - resolved "https://registry.yarnpkg.com/truffle-migrate/-/truffle-migrate-3.0.25.tgz#4ea7fd7b53b40684f84848371a246b6b30f117e1" - integrity sha512-zGClacuK6yNcJ2VdczwseI1bx+Xm43rW8ZBqGjyEBTbHJYUU04ywNze+cNwkhVvE/3oyJlsjvny5QmMeJQUEXA== +truffle-migrate@^3.0.26: + version "3.0.26" + resolved "https://registry.yarnpkg.com/truffle-migrate/-/truffle-migrate-3.0.26.tgz#62321689d1d2f386678760f185259797c5cf1c45" + integrity sha512-O3+ayvjTCEfdQWo+PMlkc/LMhqLQT4gOzdDhTdVPSFOcoVmljCf8d3xxcGeh0KVyytoNRT8HzoY9K7BkjUKiSw== dependencies: async "2.6.1" emittery "^0.4.0" node-dir "0.1.17" - truffle-config "^1.1.14" - truffle-deployer "^3.0.25" + truffle-config "^1.1.15" + truffle-deployer "^3.0.26" truffle-expect "^0.0.9" truffle-interface-adapter "^0.2.0" truffle-reporters "^1.0.10" - truffle-require "^2.0.14" + truffle-require "^2.0.15" web3 "1.0.0-beta.37" truffle-provider@^0.1.11: @@ -17017,13 +16778,13 @@ truffle-reporters@^1.0.10: ora "^3.0.0" web3-utils "1.0.0-beta.37" -truffle-require@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/truffle-require/-/truffle-require-2.0.14.tgz#401f0778595687e1d54ea4fac2d3f1f1c57f265a" - integrity sha512-nVIDsZLHTqJizuWYwpoHu2hlXvgliJiftdXjbCBNEmMkss0NtAZry4T5rePjafpWWjs0D8W7obb6aXrznBe7pg== +truffle-require@^2.0.15: + version "2.0.15" + resolved "https://registry.yarnpkg.com/truffle-require/-/truffle-require-2.0.15.tgz#6d4e4c9091eacdf26746307568d780e827ec350b" + integrity sha512-dtBg2zpIFYPPkdQU29SxMOCXKbTNirNBBhbyyobdfCOc3Xj9i4wi9mFqy4pxQ4uflfV7jpiAllzdqq+87RqJCA== dependencies: original-require "1.0.1" - truffle-config "^1.1.14" + truffle-config "^1.1.15" truffle-expect "^0.0.9" truffle-interface-adapter "^0.2.0" web3 "1.0.0-beta.37" @@ -17039,41 +16800,41 @@ truffle-resolver@^5.0.14: truffle-expect "^0.0.9" truffle-provisioner "^0.1.5" -truffle-solidity-loader@0.1.26: - version "0.1.26" - resolved "https://registry.yarnpkg.com/truffle-solidity-loader/-/truffle-solidity-loader-0.1.26.tgz#b7b517d0d375e303211c5030642e19779715b1ee" - integrity sha512-qa5LGNxP+l5e4kYLz8PdliZZxf0zXzAPh/g56OdX7f/RW4nAM1yYF+1aUafWLWQuhtl85X+P+iA3BSWHYXJ+4A== +truffle-solidity-loader@0.1.27: + version "0.1.27" + resolved "https://registry.yarnpkg.com/truffle-solidity-loader/-/truffle-solidity-loader-0.1.27.tgz#e4c06e52d8cbb64612827652244a89ec338fdbf0" + integrity sha512-t4DTulVIan1J7BFxgwyeF1z7S4nLo0z4n/WwyPu+9WRvAruxcCoQG45wUTGdjLyPpuNV2iBjt5Hbv/UV0uElNw== dependencies: chalk "^1.1.3" find-up "^1.1.2" loader-utils "^1.1.0" schema-utils "^1.0.0" - truffle-config "^1.1.14" - truffle-core "^5.0.27" + truffle-config "^1.1.15" + truffle-core "^5.0.28" truffle-solidity-utils@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/truffle-solidity-utils/-/truffle-solidity-utils-1.2.3.tgz#9e83c80fe5eeac1b9587f227af57e3feee5e183c" integrity sha512-Rf9KLx8BFTX6/1jxKuzWC5AegSMTN9uxLIKWP38oBAxHq/ilD64W+W5eyEqBxAXUYlAABj9jpOg4Pn5NRYtxOg== -truffle-workflow-compile@^2.0.23: - version "2.0.23" - resolved "https://registry.yarnpkg.com/truffle-workflow-compile/-/truffle-workflow-compile-2.0.23.tgz#6435ffae2eb286fec520c8e57e995d279ebfd361" - integrity sha512-JtJzBcCdDGKABSEih17IrBaKxDl5RgPkp+91YJo/NpfSek8S9rF65WwELF3oDU1xJlYbBfr9kIx9cryhvqwymg== +truffle-workflow-compile@^2.0.24: + version "2.0.24" + resolved "https://registry.yarnpkg.com/truffle-workflow-compile/-/truffle-workflow-compile-2.0.24.tgz#ee51a94aec6f11a9e8296ab064050f34a81fcb83" + integrity sha512-y/9rD+aUfeMZZgmYajyA9umg2Scd0ABymYljKj+qXbOwWnmi7kfPdOH2AlDpg6a7EvQapTDyvQACc4mT6mVQxA== dependencies: mkdirp "^0.5.1" - truffle-artifactor "^4.0.23" - truffle-compile "^4.1.4" - truffle-compile-vyper "^1.0.21" - truffle-config "^1.1.14" + truffle-artifactor "^4.0.24" + truffle-compile "^4.1.5" + truffle-compile-vyper "^1.0.22" + truffle-config "^1.1.15" truffle-expect "^0.0.9" truffle-external-compile "^1.0.11" truffle-resolver "^5.0.14" -truffle@5.0.27: - version "5.0.27" - resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.0.27.tgz#2842539f69d55a7cf82d21c4ffab0605953e1942" - integrity sha512-MN02w3TNOwVaEvvCD535pov7D/59p92yzQ/Os4hR2kiSGy1s+9V6RYtmOPucY8G/1wx8RnvOAgcIzcqHrO6tvQ== +truffle@5.0.28: + version "5.0.28" + resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.0.28.tgz#383c6c4ae082c52fe6dda6620f924ae3a0f5ac49" + integrity sha512-ccpvgrHW7EGfJ4cowMgh5dCAILG5Ie8q2QNBhnGtHxyPTDxb8o2/sgVIi5BZhaueijOPb47sYe2ojKlY6dk8+Q== dependencies: app-module-path "^2.2.0" mocha "5.2.0" @@ -18674,7 +18435,7 @@ webpack-sources@^1.1.0, webpack-sources@^1.3.0: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@4.36.1: +webpack@4.36.1, webpack@^4.33.0: version "4.36.1" resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.36.1.tgz#f546fda7a403a76faeaaa7196c50d12370ed18a9" integrity sha512-Ej01/N9W8DVyhEpeQnbUdGvOECw0L46FxS12cCOs8gSK7bhUlrbHRnWkjiXckGlHjUrmL89kDpTRIkUk6Y+fKg== @@ -18703,34 +18464,13 @@ webpack@4.36.1: watchpack "^1.5.0" webpack-sources "^1.3.0" -webpack@^4.33.0: - version "4.35.3" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.35.3.tgz#66bc35ef215a7b75e8790f84d560013ffecf0ca3" - integrity sha512-xggQPwr9ILlXzz61lHzjvgoqGU08v5+Wnut19Uv3GaTtzN4xBTcwnobodrXE142EL1tOiS5WVEButooGzcQzTA== +webrtc-adapter@^7.2.1: + version "7.2.8" + resolved "https://registry.yarnpkg.com/webrtc-adapter/-/webrtc-adapter-7.2.8.tgz#1373fa874559c655aa713830c2836511588d77ab" + integrity sha512-d/rZVIIqqPqu/1I9rabhI+hmVhNtT+MoJk0eipCJasiVM9L9ZOTBoVhZmtC/naB4G8GTvnCaassrDz5IqWZP6w== dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-module-context" "1.8.5" - "@webassemblyjs/wasm-edit" "1.8.5" - "@webassemblyjs/wasm-parser" "1.8.5" - acorn "^6.2.0" - ajv "^6.1.0" - ajv-keywords "^3.1.0" - chrome-trace-event "^1.0.0" - enhanced-resolve "^4.1.0" - eslint-scope "^4.0.0" - json-parse-better-errors "^1.0.2" - loader-runner "^2.3.0" - loader-utils "^1.1.0" - memory-fs "~0.4.1" - micromatch "^3.1.8" - mkdirp "~0.5.0" - neo-async "^2.5.0" - node-libs-browser "^2.0.0" - schema-utils "^1.0.0" - tapable "^1.1.0" - terser-webpack-plugin "^1.1.0" - watchpack "^1.5.0" - webpack-sources "^1.3.0" + rtcpeerconnection-shim "^1.2.15" + sdp "^2.9.0" websocket-driver@>=0.5.1: version "0.7.3" @@ -18930,12 +18670,12 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" -ws@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.1.1.tgz#1d43704689711ac1942fd2f283e38f825c4b8b95" - integrity sha512-bOusvpCb09TOBLbpMKszd45WKC2KPtxiyiHanv+H2DE3Az+1db5a/L7sVJZVDPUC1Br8f0SKRr1KjLpD1U/IAw== +ws@7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.1.0.tgz#0395646c6fcc3ac56abf61ce1a42039637a6bd98" + integrity sha512-Swie2C4fs7CkwlHu1glMePLYJJsWjzhl1vm3ZaLplD0h7OMkZyZ6kLTB/OagiU923bZrPFXuDTeEqaEN4NWG4g== dependencies: - async-limiter "~1.0.0" + async-limiter "^1.0.0" ws@^3.0.0: version "3.3.3" From e827837c582176bb5dde30d6f12eeaaf1a9bb4fd Mon Sep 17 00:00:00 2001 From: mmv Date: Fri, 19 Jul 2019 17:09:27 +0400 Subject: [PATCH 07/14] QRCode scanner logic --- src/components/Stepper/index.jsx | 11 +++++++-- src/routes/open/components/Layout.jsx | 7 ++++++ .../ScanQRModal/index.jsx | 20 ++++++++++++---- .../ScanQRModal/style.js | 1 + .../SafeOwnersConfirmationsForm/index.jsx | 24 +++++++++++++++---- 5 files changed, 51 insertions(+), 12 deletions(-) diff --git a/src/components/Stepper/index.jsx b/src/components/Stepper/index.jsx index dcca07cf..2b2bae41 100644 --- a/src/components/Stepper/index.jsx +++ b/src/components/Stepper/index.jsx @@ -21,6 +21,7 @@ type Props = { classes: Object, initialValues?: Object, disabledWhenValidating?: boolean, + mutators?: Object, testId?: string, } @@ -109,7 +110,7 @@ const GnoStepper = (props: Props) => { } const { - steps, children, classes, disabledWhenValidating = false, testId, + steps, children, classes, disabledWhenValidating = false, testId, mutators, } = props const activePage = getActivePageFrom(children) @@ -118,7 +119,13 @@ const GnoStepper = (props: Props) => { return ( - + {(submitting: boolean, validating: boolean, ...rest: any) => { const disabled = disabledWhenValidating ? submitting || validating : submitting const controls = ( diff --git a/src/routes/open/components/Layout.jsx b/src/routes/open/components/Layout.jsx index 663bad9f..26c0f7c0 100644 --- a/src/routes/open/components/Layout.jsx +++ b/src/routes/open/components/Layout.jsx @@ -38,6 +38,12 @@ const back = () => { history.goBack() } +const formMutators = { + setValue: ([field, value], state, { changeValue }) => { + changeValue(state, field, () => value) + }, +} + const Layout = ({ provider, userAccount, onCallSafeContractSubmit, network, }: Props) => { @@ -58,6 +64,7 @@ const Layout = ({ onSubmit={onCallSafeContractSubmit} steps={steps} initialValues={initialValues} + mutators={formMutators} testId="create-safe-form" > {SafeNameField} diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/index.jsx b/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/index.jsx index e6dffc71..c9adbe0a 100644 --- a/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/index.jsx +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/ScanQRModal/index.jsx @@ -46,19 +46,22 @@ const styles = () => ({ button: { '&:last-child': { marginLeft: sm, - } + }, }, }) type Props = { onClose: () => void, classes: Object, + onScan: Function, isOpen: boolean, } -const ScanQRModal = ({ classes, onClose, isOpen }: Props) => { +const ScanQRModal = ({ + classes, onClose, isOpen, onScan, +}: Props) => { const [hasWebcam, setHasWebcam] = useState(null) - const scannerRef = React.createRef() + const scannerRef: Object = React.createRef() const openImageDialog = () => { scannerRef.current.openImageDialog() } @@ -101,7 +104,7 @@ const ScanQRModal = ({ classes, onClose, isOpen }: Props) => { ref={scannerRef} legacyMode={!hasWebcam} onScan={(data) => { - if (data) console.log(data) + if (data) onScan(data) }} onError={(err) => { console.error(err) @@ -112,7 +115,14 @@ const ScanQRModal = ({ classes, onClose, isOpen }: Props) => { - - + Any transaction requires the confirmation of: From 5bd103f25cbf430473c6ba242a7aa683fc12c3e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Tue, 23 Jul 2019 14:00:05 +0200 Subject: [PATCH 12/14] Fix remove prefix in scanned address --- .../open/components/SafeOwnersConfirmationsForm/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx b/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx index 94f9a217..242b7f56 100644 --- a/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx @@ -111,7 +111,7 @@ const SafeOwners = (props: Props) => { scannedAddress = scannedAddress.replace('ethereum:', '') } - form.mutators.setValue(scanQrForOwnerName, value) + form.mutators.setValue(scanQrForOwnerName, scannedAddress) closeQrModal() } From 8d474c618a5b66e17b8c8116890791d8bf4211d1 Mon Sep 17 00:00:00 2001 From: mmv Date: Thu, 25 Jul 2019 15:26:01 +0400 Subject: [PATCH 13/14] fix removal of the second owner --- .../SafeOwnersConfirmationsForm/index.jsx | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx b/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx index 242b7f56..bd36a6cf 100644 --- a/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx +++ b/src/routes/open/components/SafeOwnersConfirmationsForm/index.jsx @@ -37,7 +37,6 @@ type Props = { errors: Object, form: Object, values: Object, - updateInitialProps: (initialValues: Object) => void, } const { useState } = React @@ -66,12 +65,13 @@ export const calculateValuesAfterRemoving = (index: number, notRemovedOwners: nu const SafeOwners = (props: Props) => { const { - classes, errors, otherAccounts, values, updateInitialProps, form, + classes, errors, otherAccounts, values, form, } = props - const [numOwners, setNumOwners] = useState(1) + + const validOwners = getNumOwnersFrom(values) + const [numOwners, setNumOwners] = useState(validOwners) const [qrModalOpen, setQrModalOpen] = useState(false) const [scanQrForOwnerName, setScanQrForOwnerName] = useState(null) - const validOwners = getNumOwnersFrom(values) const openQrModal = (ownerName) => { setScanQrForOwnerName(ownerName) @@ -83,19 +83,8 @@ const SafeOwners = (props: Props) => { } const onRemoveRow = (index: number) => () => { - if (numOwners === 2) { - form.reset() - } else { - const initialValues = calculateValuesAfterRemoving(index, numOwners, values) - - if (Object.keys(initialValues).length === 4) { - // this means that the form is back to its inital state - // and if they're equal it won't update the form - form.reset() - } else { - updateInitialProps(initialValues) - } - } + const initialValues = calculateValuesAfterRemoving(index, numOwners, values) + form.reset(initialValues) setNumOwners(numOwners - 1) } From 3bbe9f32fb96364670c2bdfbce35c63f98c10252 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Fri, 26 Jul 2019 12:09:28 +0400 Subject: [PATCH 14/14] fix reload crash with safe extension --- .../TxsTable/ExpandedTx/TxDescription/utils.js | 6 +++--- .../safe/components/TransactionsNew/TxsTable/columns.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/TxDescription/utils.js b/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/TxDescription/utils.js index 7bb034a8..dd9744da 100644 --- a/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/TxDescription/utils.js +++ b/src/routes/safe/components/TransactionsNew/TxsTable/ExpandedTx/TxDescription/utils.js @@ -2,9 +2,6 @@ import { type Transaction } from '~/routes/safe/store/models/transaction' import { getWeb3 } from '~/logic/wallets/getWeb3' -const web3 = getWeb3() -const { toBN, fromWei } = web3.utils - type DecodedTxData = { recipient: string, value?: string, @@ -16,6 +13,9 @@ type DecodedTxData = { } export const getTxData = (tx: Transaction): DecodedTxData => { + const web3 = getWeb3() + const { toBN, fromWei } = web3.utils + const txData = {} if (tx.isTokenTransfer && tx.decodedParams) { diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/columns.js b/src/routes/safe/components/TransactionsNew/TxsTable/columns.js index 1db556a0..6902b8b4 100644 --- a/src/routes/safe/components/TransactionsNew/TxsTable/columns.js +++ b/src/routes/safe/components/TransactionsNew/TxsTable/columns.js @@ -14,9 +14,6 @@ export const TX_TABLE_STATUS_ID = 'status' export const TX_TABLE_RAW_TX_ID = 'tx' export const TX_TABLE_EXPAND_ICON = 'expand' -const web3 = getWeb3() -const { toBN, fromWei } = web3.utils - type TxData = { nonce: number, type: string, @@ -29,6 +26,9 @@ type TxData = { export const formatDate = (date: Date): string => format(date, 'MMM D, YYYY - HH:mm:ss') export const getTxAmount = (tx: Transaction) => { + const web3 = getWeb3() + const { toBN, fromWei } = web3.utils + let txAmount = 'n/a' if (tx.isTokenTransfer && tx.decodedParams) {