diff --git a/js/src/modals/SMSVerification/GatherData/gatherData.js b/js/src/modals/SMSVerification/GatherData/gatherData.js
index 24c32aa3a..c89263bd9 100644
--- a/js/src/modals/SMSVerification/GatherData/gatherData.js
+++ b/js/src/modals/SMSVerification/GatherData/gatherData.js
@@ -15,56 +15,33 @@
// along with Parity. If not, see .
import React, { Component, PropTypes } from 'react';
+import BigNumber from 'bignumber.js';
import { Checkbox } from 'material-ui';
import InfoIcon from 'material-ui/svg-icons/action/info-outline';
import SuccessIcon from 'material-ui/svg-icons/navigation/check';
import ErrorIcon from 'material-ui/svg-icons/navigation/close';
-import phone from 'phoneformat.js';
-
import { fromWei } from '../../../api/util/wei';
import { Form, Input } from '../../../ui';
-import checkIfVerified from '../check-if-verified';
-import checkIfRequested from '../check-if-requested';
import terms from '../terms-of-service';
import styles from './gatherData.css';
+const nullable = (type) => PropTypes.oneOfType([ PropTypes.oneOf([ null ]), type ]);
+
export default class GatherData extends Component {
- static contextTypes = {
- api: PropTypes.object.isRequired
- }
-
static propTypes = {
- account: PropTypes.string.isRequired,
- contract: PropTypes.object.isRequired,
- data: PropTypes.object.isRequired,
- onData: PropTypes.func.isRequired,
- onDataIsValid: PropTypes.func.isRequired,
- onDataIsInvalid: PropTypes.func.isRequired
- }
-
- state = {
- init: true,
- numberIsValid: null,
- consentGiven: false
- };
-
- componentWillMount () {
- const { init } = this.state;
- if (init) {
- this.setState({ init: false });
- this.queryFee();
- this.checkIfCertified();
- this.checkIfRequested();
- }
+ fee: React.PropTypes.instanceOf(BigNumber),
+ isNumberValid: PropTypes.bool.isRequired,
+ isVerified: nullable(PropTypes.bool.isRequired),
+ hasRequested: nullable(PropTypes.bool.isRequired),
+ setNumber: PropTypes.func.isRequired,
+ setConsentGiven: PropTypes.func.isRequired
}
render () {
- const { numberIsValid } = this.state;
- const { isVerified } = this.props.data;
+ const { isNumberValid, isVerified } = this.props;
- // TODO: proper legal text
return (