add getStatusContactCode to registerSubDomain Page

This commit is contained in:
Barry Gitarts 2018-07-27 15:12:25 -04:00
parent a3ddf46075
commit fb27a18184
1 changed files with 9 additions and 2 deletions

View File

@ -1,11 +1,13 @@
import web3 from "Embark/web3" import web3 from "Embark/web3"
import ENSSubdomainRegistry from 'Embark/contracts/ENSSubdomainRegistry'; import ENSSubdomainRegistry from 'Embark/contracts/ENSSubdomainRegistry';
import React from 'react'; import React from 'react';
import { connect } from 'react-redux';
import Hidden from '@material-ui/core/Hidden'; import Hidden from '@material-ui/core/Hidden';
import { Button, MobileSearch, MobileButton, Field } from '../../ui/components'; import { Button, MobileSearch, MobileButton, Field } from '../../ui/components';
import { withFormik } from 'formik'; import { withFormik } from 'formik';
import { hash } from 'eth-ens-namehash'; import { hash } from 'eth-ens-namehash';
import { zeroAddress, zeroBytes32, formatPrice } from './utils'; import { zeroAddress, zeroBytes32, formatPrice } from './utils';
import { getStatusContactCode } from '../../reducers/accounts';
import FieldGroup from '../standard/FieldGroup'; import FieldGroup from '../standard/FieldGroup';
import LinearProgress from '@material-ui/core/LinearProgress'; import LinearProgress from '@material-ui/core/LinearProgress';
@ -23,6 +25,7 @@ const InnerForm = ({
subDomain, subDomain,
domainName, domainName,
domainPrice, domainPrice,
statusContactCode
}) => ( }) => (
<form onSubmit={handleSubmit}> <form onSubmit={handleSubmit}>
{!subDomain && {!subDomain &&
@ -97,9 +100,9 @@ const InnerForm = ({
name="statusAddress" name="statusAddress"
style={{ marginTop: '10px' }} style={{ marginTop: '10px' }}
placeholder="Status Messenger Address" placeholder="Status Messenger Address"
label="test"
value={values.statusAddress} value={values.statusAddress}
onChange={handleChange} onChange={handleChange}
paste={() => setFieldValue('statusAddress', statusContactCode)}
wide /> wide />
</Field> </Field>
<Field label="Your Wallet Address"> <Field label="Your Wallet Address">
@ -173,4 +176,8 @@ const RegisterSubDomain = withFormik({
} }
})(InnerForm); })(InnerForm);
export default RegisterSubDomain; const mapStateToProps = state => ({
statusContactCode: getStatusContactCode(state)
});
export default connect(mapStateToProps)(RegisterSubDomain);