diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-08-09 02:30:49 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-08-09 02:30:49 +0800 |
commit | 286bde606f1c42a8edf2793b78042f5ef3271894 (patch) | |
tree | c8beb87f4726385fa766bb5ccea185055a244acb /mascara | |
parent | 0ebdd73e027f62bb5d83f96fcbca85f4e9c9038c (diff) | |
download | tangerine-wallet-browser-286bde606f1c42a8edf2793b78042f5ef3271894.tar tangerine-wallet-browser-286bde606f1c42a8edf2793b78042f5ef3271894.tar.gz tangerine-wallet-browser-286bde606f1c42a8edf2793b78042f5ef3271894.tar.bz2 tangerine-wallet-browser-286bde606f1c42a8edf2793b78042f5ef3271894.tar.lz tangerine-wallet-browser-286bde606f1c42a8edf2793b78042f5ef3271894.tar.xz tangerine-wallet-browser-286bde606f1c42a8edf2793b78042f5ef3271894.tar.zst tangerine-wallet-browser-286bde606f1c42a8edf2793b78042f5ef3271894.zip |
fix merge conflicts
Diffstat (limited to 'mascara')
-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 |
2 files changed, 8 insertions, 2 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 }) |