aboutsummaryrefslogtreecommitdiffstats
path: root/mascara/src/app/first-time/import-seed-phrase-screen.js
diff options
context:
space:
mode:
Diffstat (limited to 'mascara/src/app/first-time/import-seed-phrase-screen.js')
-rw-r--r--mascara/src/app/first-time/import-seed-phrase-screen.js17
1 files changed, 9 insertions, 8 deletions
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 86f02ceac..5834919de 100644
--- a/mascara/src/app/first-time/import-seed-phrase-screen.js
+++ b/mascara/src/app/first-time/import-seed-phrase-screen.js
@@ -8,16 +8,16 @@ import {
displayWarning,
unMarkPasswordForgotten,
} from '../../../../ui/app/actions'
+import { DEFAULT_ROUTE, INITIALIZE_NOTICE_ROUTE } from '../../../../ui/app/routes'
class ImportSeedPhraseScreen extends Component {
static propTypes = {
warning: PropTypes.string,
- back: PropTypes.func.isRequired,
- next: PropTypes.func.isRequired,
createNewVaultAndRestore: PropTypes.func.isRequired,
hideWarning: PropTypes.func.isRequired,
displayWarning: PropTypes.func,
leaveImportSeedScreenState: PropTypes.func,
+ history: PropTypes.object,
};
state = {
@@ -64,20 +64,21 @@ class ImportSeedPhraseScreen extends Component {
const { password, seedPhrase } = this.state
const {
createNewVaultAndRestore,
- next,
displayWarning,
leaveImportSeedScreenState,
+ history,
} = this.props
leaveImportSeedScreenState()
createNewVaultAndRestore(password, this.parseSeedPhrase(seedPhrase))
- .then(next)
+ .then(() => history.push(INITIALIZE_NOTICE_ROUTE))
}
render () {
const { seedPhrase, password, confirmPassword } = this.state
- const { warning } = this.props
- const importDisabled = warning || !seedPhrase || !password || !confirmPassword
+ const { warning, isLoading } = this.props
+ const importDisabled = warning || !seedPhrase || !password || !confirmPassword || isLoading
+
return (
<div className="first-view-main-wrapper">
<div className="first-view-main">
@@ -86,7 +87,7 @@ class ImportSeedPhraseScreen extends Component {
className="import-account__back-button"
onClick={e => {
e.preventDefault()
- this.props.back()
+ this.props.history.goBack()
}}
href="#"
>
@@ -152,7 +153,7 @@ class ImportSeedPhraseScreen extends Component {
}
export default connect(
- ({ appState: { warning } }) => ({ warning }),
+ ({ appState: { warning, isLoading } }) => ({ warning, isLoading }),
dispatch => ({
leaveImportSeedScreenState: () => {
dispatch(unMarkPasswordForgotten())