aboutsummaryrefslogtreecommitdiffstats
path: root/mascara
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2018-08-10 06:39:48 +0800
committerGitHub <noreply@github.com>2018-08-10 06:39:48 +0800
commitef7e638dda63a715c796c210dadbe82430537b6a (patch)
tree23b5b62ac378f5cc302a0d9019fba8a7c622cf04 /mascara
parent0601df9dae488d997277bb6b52c28df27546e27c (diff)
parent06633da1b395829b475ccafb429af040256d863c (diff)
downloadtangerine-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.js1
-rw-r--r--mascara/src/app/first-time/import-seed-phrase-screen.js9
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 })