diff --git a/js/src/modals/SMSVerification/CheckIfCertified/checkIfCertified.css b/js/src/modals/SMSVerification/CheckIfCertified/checkIfCertified.css
deleted file mode 100644
index 13779b8f4..000000000
--- a/js/src/modals/SMSVerification/CheckIfCertified/checkIfCertified.css
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright 2015, 2016 Ethcore (UK) Ltd.
-/* This file is part of Parity.
-/*
-/* Parity is free software: you can redistribute it and/or modify
-/* it under the terms of the GNU General Public License as published by
-/* the Free Software Foundation, either version 3 of the License, or
-/* (at your option) any later version.
-/*
-/* Parity is distributed in the hope that it will be useful,
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/* GNU General Public License for more details.
-/*
-/* You should have received a copy of the GNU General Public License
-/* along with Parity. If not, see .
-*/
-
-.container {
- display: flex;
- align-items: center;
-}
-
-.message {
- margin-top: 0;
- margin-bottom: 0;
- margin-left: .5em;
-}
diff --git a/js/src/modals/SMSVerification/CheckIfCertified/checkIfCertified.js b/js/src/modals/SMSVerification/CheckIfCertified/checkIfCertified.js
deleted file mode 100644
index b9048f6e7..000000000
--- a/js/src/modals/SMSVerification/CheckIfCertified/checkIfCertified.js
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2015, 2016 Ethcore (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-import React, { Component, PropTypes } from 'react';
-import SuccessIcon from 'material-ui/svg-icons/navigation/check';
-import ErrorIcon from 'material-ui/svg-icons/alert/error-outline';
-
-import styles from './checkIfCertified.css';
-
-export default class CheckIfCertified extends Component {
- static contextTypes = {
- api: PropTypes.object.isRequired
- }
-
- static propTypes = {
- account: PropTypes.string.isRequired,
- contract: PropTypes.object.isRequired,
- onIsCertified: PropTypes.func.isRequired,
- onIsNotCertified: PropTypes.func.isRequired
- }
-
- state = {
- pending: false,
- isCertified: null
- };
-
- componentWillMount () {
- const { pending } = this.state;
- if (pending) {
- return;
- }
- this.setState({ pending: true });
-
- const { account, contract, onIsCertified, onIsNotCertified } = this.props;
-
- contract.instance.certified.call({}, [account])
- .then((isCertified) => {
- this.setState({ isCertified, pending: false });
- if (isCertified) {
- onIsCertified();
- } else {
- onIsNotCertified();
- }
- })
- .catch((err) => {
- console.error('error checking if certified', err);
- });
- }
-
- render () {
- const { pending, isCertified } = this.state;
-
- if (pending) {
- return (
Checking if your account is verified…
);
- }
-
- if (isCertified) {
- return (
-
-
-
Your account is already verified.
-
- );
- }
- return (
-
-
-
Your account is not verified yet.
-
- );
- }
-}
diff --git a/js/src/modals/SMSVerification/CheckIfCertified/index.js b/js/src/modals/SMSVerification/CheckIfCertified/index.js
deleted file mode 100644
index 2577505e2..000000000
--- a/js/src/modals/SMSVerification/CheckIfCertified/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015, 2016 Ethcore (UK) Ltd.
-// This file is part of Parity.
-
-// Parity is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Parity is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Parity. If not, see .
-
-export default from './checkIfCertified';
diff --git a/js/src/modals/SMSVerification/GatherData/gatherData.css b/js/src/modals/SMSVerification/GatherData/gatherData.css
index ac956063c..4bd7697fb 100644
--- a/js/src/modals/SMSVerification/GatherData/gatherData.css
+++ b/js/src/modals/SMSVerification/GatherData/gatherData.css
@@ -17,3 +17,14 @@
.spacing {
margin-top: 1.5em;
}
+
+.container {
+ margin-top: .5em;
+ display: flex;
+ align-items: center;
+}
+.message {
+ margin-top: 0;
+ margin-bottom: 0;
+ margin-left: .5em;
+}
diff --git a/js/src/modals/SMSVerification/GatherData/gatherData.js b/js/src/modals/SMSVerification/GatherData/gatherData.js
index fd5d00791..44f0d5340 100644
--- a/js/src/modals/SMSVerification/GatherData/gatherData.js
+++ b/js/src/modals/SMSVerification/GatherData/gatherData.js
@@ -16,6 +16,9 @@
import React, { Component, PropTypes } from 'react';
import { Checkbox } from 'material-ui';
+import SuccessIcon from 'material-ui/svg-icons/navigation/check';
+import ErrorIcon from 'material-ui/svg-icons/alert/error-outline';
+
import phone from 'phoneformat.js';
import { fromWei } from '../../../api/util/wei';
@@ -24,7 +27,12 @@ import { Form, Input } from '../../../ui';
import styles from './gatherData.css';
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,
@@ -34,6 +42,7 @@ export default class GatherData extends Component {
state = {
init: true,
+ isCertified: null,
numberIsValid: null,
consentGiven: false
};
@@ -41,8 +50,9 @@ export default class GatherData extends Component {
componentWillMount () {
const { init } = this.state;
if (init) {
- this.queryFee();
this.setState({ init: false });
+ this.queryFee();
+ this.checkIfCertified();
}
}
@@ -53,6 +63,7 @@ export default class GatherData extends Component {
return (