diff options
Diffstat (limited to 'mascara/src/app/first-time')
-rw-r--r-- | mascara/src/app/first-time/confirm-seed-screen.js | 1 | ||||
-rw-r--r-- | mascara/src/app/first-time/import-seed-phrase-screen.js | 9 | ||||
-rw-r--r-- | mascara/src/app/first-time/index.js | 20 |
3 files changed, 8 insertions, 22 deletions
diff --git a/mascara/src/app/first-time/confirm-seed-screen.js b/mascara/src/app/first-time/confirm-seed-screen.js index 7c0431431..dfbaffe33 100644 --- a/mascara/src/app/first-time/confirm-seed-screen.js +++ b/mascara/src/app/first-time/confirm-seed-screen.js @@ -106,6 +106,7 @@ class ConfirmSeedScreen extends Component { key={i} className={classnames('backup-phrase__confirm-seed-option', { 'backup-phrase__confirm-seed-option--selected': isSelected, + 'backup-phrase__confirm-seed-option--unselected': !isSelected, })} onClick={() => { if (!isSelected) { diff --git a/mascara/src/app/first-time/import-seed-phrase-screen.js b/mascara/src/app/first-time/import-seed-phrase-screen.js index fd2516ad4..883893e88 100644 --- a/mascara/src/app/first-time/import-seed-phrase-screen.js +++ b/mascara/src/app/first-time/import-seed-phrase-screen.js @@ -1,3 +1,4 @@ +import {validateMnemonic} from 'bip39' import React, { Component } from 'react' import PropTypes from 'prop-types' import {connect} from 'react-redux' @@ -39,8 +40,12 @@ class ImportSeedPhraseScreen extends Component { handleSeedPhraseChange (seedPhrase) { let seedPhraseError = null - if (seedPhrase && this.parseSeedPhrase(seedPhrase).split(' ').length !== 12) { - seedPhraseError = this.context.t('seedPhraseReq') + if (seedPhrase) { + if (this.parseSeedPhrase(seedPhrase).split(' ').length !== 12) { + seedPhraseError = this.context.t('seedPhraseReq') + } else if (!validateMnemonic(seedPhrase)) { + seedPhraseError = this.context.t('invalidSeedPhrase') + } } this.setState({ seedPhrase, seedPhraseError }) diff --git a/mascara/src/app/first-time/index.js b/mascara/src/app/first-time/index.js index dc254bb19..6e4dc74bb 100644 --- a/mascara/src/app/first-time/index.js +++ b/mascara/src/app/first-time/index.js @@ -3,7 +3,6 @@ import PropTypes from 'prop-types' import {connect} from 'react-redux' import { withRouter, Switch, Route } from 'react-router-dom' import { compose } from 'recompose' -import classnames from 'classnames' import CreatePasswordScreen from './create-password-screen' import UniqueImageScreen from './unique-image-screen' @@ -44,28 +43,9 @@ class FirstTimeFlow extends Component { noActiveNotices: false, }; - renderAppBar () { - const { welcomeScreenSeen } = this.props - - return ( - <div className="alpha-warning__container"> - <h2 className={classnames({ - 'alpha-warning': welcomeScreenSeen, - 'alpha-warning-welcome-screen': !welcomeScreenSeen, - })} - > - Please be aware that this version is still under development - </h2> - </div> - ) - } - render () { - const { isPopup } = this.props - return ( <div className="flex-column flex-grow"> - { !isPopup && this.renderAppBar() } <div className="first-time-flow"> <Switch> <Route exact path={INITIALIZE_IMPORT_ACCOUNT_ROUTE} component={ImportAccountScreen} /> |