aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/keychains/hd
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-04-10 01:55:46 +0800
committerGitHub <noreply@github.com>2018-04-10 01:55:46 +0800
commit4cae3d3b0d2a9cc0279e44de256e7fc7e219dca1 (patch)
tree3439d92871f38765cf5dfa4ac310b11aeb5068bb /ui/app/keychains/hd
parent2511a9e634234135862259510a38b69308c2b81b (diff)
parent1e6f062bb6bbc39d6ab21a351fdb0d3bcab4d7d5 (diff)
downloadtangerine-wallet-browser-4cae3d3b0d2a9cc0279e44de256e7fc7e219dca1.tar.gz
tangerine-wallet-browser-4cae3d3b0d2a9cc0279e44de256e7fc7e219dca1.tar.zst
tangerine-wallet-browser-4cae3d3b0d2a9cc0279e44de256e7fc7e219dca1.zip
Merge pull request #3921 from MetaMask/gh-3736-react-router
Add react-router integration
Diffstat (limited to 'ui/app/keychains/hd')
-rw-r--r--ui/app/keychains/hd/recover-seed/confirmation.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/ui/app/keychains/hd/recover-seed/confirmation.js b/ui/app/keychains/hd/recover-seed/confirmation.js
index 02183f096..eb588415f 100644
--- a/ui/app/keychains/hd/recover-seed/confirmation.js
+++ b/ui/app/keychains/hd/recover-seed/confirmation.js
@@ -4,12 +4,21 @@ const PropTypes = require('prop-types')
const connect = require('react-redux').connect
const h = require('react-hyperscript')
const actions = require('../../../actions')
+const { withRouter } = require('react-router-dom')
+const { compose } = require('recompose')
+const {
+ DEFAULT_ROUTE,
+ INITIALIZE_BACKUP_PHRASE_ROUTE,
+} = require('../../../routes')
RevealSeedConfirmation.contextTypes = {
t: PropTypes.func,
}
-module.exports = connect(mapStateToProps)(RevealSeedConfirmation)
+module.exports = compose(
+ withRouter,
+ connect(mapStateToProps)
+)(RevealSeedConfirmation)
inherits(RevealSeedConfirmation, Component)
@@ -109,6 +118,8 @@ RevealSeedConfirmation.prototype.componentDidMount = function () {
RevealSeedConfirmation.prototype.goHome = function () {
this.props.dispatch(actions.showConfigPage(false))
+ this.props.dispatch(actions.confirmSeedWords())
+ .then(() => this.props.history.push(DEFAULT_ROUTE))
}
// create vault
@@ -123,4 +134,5 @@ RevealSeedConfirmation.prototype.checkConfirmation = function (event) {
RevealSeedConfirmation.prototype.revealSeedWords = function () {
var password = document.getElementById('password-box').value
this.props.dispatch(actions.requestRevealSeed(password))
+ .then(() => this.props.history.push(INITIALIZE_BACKUP_PHRASE_ROUTE))
}