diff options
author | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-08-10 06:39:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-10 06:39:48 +0800 |
commit | ef7e638dda63a715c796c210dadbe82430537b6a (patch) | |
tree | 23b5b62ac378f5cc302a0d9019fba8a7c622cf04 /mascara | |
parent | 0601df9dae488d997277bb6b52c28df27546e27c (diff) | |
parent | 06633da1b395829b475ccafb429af040256d863c (diff) | |
download | tangerine-wallet-browser-4.9.2.1.tar tangerine-wallet-browser-4.9.2.1.tar.gz tangerine-wallet-browser-4.9.2.1.tar.bz2 tangerine-wallet-browser-4.9.2.1.tar.lz tangerine-wallet-browser-4.9.2.1.tar.xz tangerine-wallet-browser-4.9.2.1.tar.zst tangerine-wallet-browser-4.9.2.1.zip |
Merge pull request #5025 from MetaMask/v4.9.2v4.9.2.1
v4.9.2
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 }) |