diff --git a/src/components/Stepper/index.jsx b/src/components/Stepper/index.jsx index 7d3de182..5d074c9e 100644 --- a/src/components/Stepper/index.jsx +++ b/src/components/Stepper/index.jsx @@ -57,7 +57,7 @@ class GnoStepper extends React.PureComponent { this.state = { page: 0, - values: props.initialValues || {}, + values: {}, } } @@ -146,7 +146,7 @@ class GnoStepper extends React.PureComponent { render() { const { - steps, children, classes, disabledWhenValidating = false, testId, + steps, children, classes, disabledWhenValidating = false, testId, initialValues, } = this.props const { page, values } = this.state const activePage = this.getActivePageFrom(children) @@ -155,7 +155,7 @@ class GnoStepper extends React.PureComponent { return ( - + {(submitting: boolean, validating: boolean, ...rest: any) => { const disabled = disabledWhenValidating ? submitting || validating : submitting const controls = ( diff --git a/src/routes/load/components/OwnerList/index.jsx b/src/routes/load/components/OwnerList/index.jsx index 4d3c244e..b1ca3c16 100644 --- a/src/routes/load/components/OwnerList/index.jsx +++ b/src/routes/load/components/OwnerList/index.jsx @@ -92,6 +92,8 @@ const calculateSafeValues = (owners: Array, threshold: Number, values: O } class OwnerListComponent extends React.PureComponent { + static whyDidYouRender = true + state = { owners: [], } @@ -113,7 +115,7 @@ class OwnerListComponent extends React.PureComponent { if (!owners) { return } - + console.log('eee') if (this.mounted) { this.setState(() => ({ owners: owners.sort() })) } @@ -126,6 +128,7 @@ class OwnerListComponent extends React.PureComponent { render() { const { network, classes } = this.props const { owners } = this.state + console.log(owners) return ( @@ -141,8 +144,8 @@ class OwnerListComponent extends React.PureComponent { - {owners.map((x, index) => ( - + {owners.map((address, index) => ( + { component={TextField} type="text" validate={required} - defaultValue={`Owner #${index + 1}`} + initialValue={`Owner #${index + 1}`} placeholder="Owner Name*" text="Owner Name" /> - + - {owners[index]} + {address} - + - )) } + ))} ) @@ -179,13 +182,11 @@ const OwnerListPage = withStyles(styles)(OwnerListComponent) const OwnerList = ({ updateInitialProps }: Object, network: string) => (controls: React$Node, { values }: Object) => ( - + ) +OwnerList.whyDidYouRender = true + export default OwnerList diff --git a/src/routes/load/components/fields.js b/src/routes/load/components/fields.js index cb7ce7b0..99df81bd 100644 --- a/src/routes/load/components/fields.js +++ b/src/routes/load/components/fields.js @@ -1,4 +1,4 @@ // @flow export const FIELD_LOAD_NAME: string = 'name' export const FIELD_LOAD_ADDRESS: string = 'address' -export const THRESHOLD: Number = 'threshold' +export const THRESHOLD: string = 'threshold' diff --git a/src/test/safe.dom.funds.test.js b/src/test/safe.dom.funds.test.js index 974f3a93..4e245ed1 100644 --- a/src/test/safe.dom.funds.test.js +++ b/src/test/safe.dom.funds.test.js @@ -119,4 +119,4 @@ describe('DOM > Feature > Funds', () => { const receiverFunds = await calculateBalanceOf(tokenAddress, tokenReceiver, 18) expect(receiverFunds).toBe(tokensAmount) }) -}) \ No newline at end of file +})