From bd839d019c5933b6dc7372b5ead4ee9bcabb3333 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Thu, 10 Nov 2016 16:23:09 +0100 Subject: [PATCH] sms verification: polish UI, linting issues :shirt: --- js/src/modals/SMSVerification/GatherData/gatherData.js | 8 ++++---- js/src/modals/SMSVerification/QueryCode/queryCode.js | 2 -- js/src/modals/SMSVerification/SMSVerification.js | 8 ++++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/js/src/modals/SMSVerification/GatherData/gatherData.js b/js/src/modals/SMSVerification/GatherData/gatherData.js index 528aaf1d1..035874b62 100644 --- a/js/src/modals/SMSVerification/GatherData/gatherData.js +++ b/js/src/modals/SMSVerification/GatherData/gatherData.js @@ -61,7 +61,7 @@ export default class GatherData extends Component { render () { const { numberIsValid } = this.state; - const { isVerified, hasRequested } = this.props.data; + const { isVerified } = this.props.data; // TODO: proper legal text return ( @@ -79,14 +79,14 @@ export default class GatherData extends Component { label={ 'phone number' } hint={ 'the SMS will be sent to this number' } error={ numberIsValid ? null : 'invalid number' } - disabled={ isVerified || hasRequested } + disabled={ isVerified } onChange={ this.numberOnChange } onSubmit={ this.numberOnSubmit } /> @@ -140,7 +140,7 @@ export default class GatherData extends Component { if (hasRequested) { return (
- +

You already requested verification.

); diff --git a/js/src/modals/SMSVerification/QueryCode/queryCode.js b/js/src/modals/SMSVerification/QueryCode/queryCode.js index 08d9089e3..f06a8ace6 100644 --- a/js/src/modals/SMSVerification/QueryCode/queryCode.js +++ b/js/src/modals/SMSVerification/QueryCode/queryCode.js @@ -18,8 +18,6 @@ import React, { Component, PropTypes } from 'react'; import { Form, Input } from '../../../ui'; -// import styles from './gatherData.css'; - const isValidCode = /^[A-Z0-9_-]{7,14}$/i; export default class QueryCode extends Component { diff --git a/js/src/modals/SMSVerification/SMSVerification.js b/js/src/modals/SMSVerification/SMSVerification.js index 1e20ea705..ce2549ebc 100644 --- a/js/src/modals/SMSVerification/SMSVerification.js +++ b/js/src/modals/SMSVerification/SMSVerification.js @@ -18,10 +18,10 @@ import React, { Component, PropTypes } from 'react'; import ActionDoneAll from 'material-ui/svg-icons/action/done-all'; import ContentClear from 'material-ui/svg-icons/content/clear'; -import { BusyStep, CompletedStep, Button, IdentityIcon, Modal } from '../../ui'; -import { validateAddress, validateUint } from '../../util/validation'; +import { Button, IdentityIcon, Modal } from '../../ui'; import ABI from '../../contracts/abi/sms-verification.json'; +// TODO: move this to a better place const contract = '0xcE381B876A85A72303f7cA7b3a012f58F4CEEEeB'; import GatherData from './GatherData'; @@ -120,9 +120,9 @@ export default class SMSVerification extends Component { const { step } = this.state; if (step === 4) { return this.renderFifthStep(); - } else if (step === 3) { + } else if (step === 3) { return this.renderFourthStep(); - } else if (step === 2) { + } else if (step === 2) { return this.renderThirdStep(); } else if (step === 1) { return this.renderSecondStep();