mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Use new design for showing seed words
This commit is contained in:
parent
007f91cc50
commit
7776af7cd0
@ -4,12 +4,21 @@ const PropTypes = require('prop-types')
|
|||||||
const connect = require('react-redux').connect
|
const connect = require('react-redux').connect
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const actions = require('../../../actions')
|
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 = {
|
RevealSeedConfirmation.contextTypes = {
|
||||||
t: PropTypes.func,
|
t: PropTypes.func,
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = connect(mapStateToProps)(RevealSeedConfirmation)
|
module.exports = compose(
|
||||||
|
withRouter,
|
||||||
|
connect(mapStateToProps)
|
||||||
|
)(RevealSeedConfirmation)
|
||||||
|
|
||||||
|
|
||||||
inherits(RevealSeedConfirmation, Component)
|
inherits(RevealSeedConfirmation, Component)
|
||||||
@ -109,6 +118,8 @@ RevealSeedConfirmation.prototype.componentDidMount = function () {
|
|||||||
|
|
||||||
RevealSeedConfirmation.prototype.goHome = function () {
|
RevealSeedConfirmation.prototype.goHome = function () {
|
||||||
this.props.dispatch(actions.showConfigPage(false))
|
this.props.dispatch(actions.showConfigPage(false))
|
||||||
|
this.props.dispatch(actions.confirmSeedWords())
|
||||||
|
.then(() => this.props.history.push(DEFAULT_ROUTE))
|
||||||
}
|
}
|
||||||
|
|
||||||
// create vault
|
// create vault
|
||||||
@ -123,4 +134,5 @@ RevealSeedConfirmation.prototype.checkConfirmation = function (event) {
|
|||||||
RevealSeedConfirmation.prototype.revealSeedWords = function () {
|
RevealSeedConfirmation.prototype.revealSeedWords = function () {
|
||||||
var password = document.getElementById('password-box').value
|
var password = document.getElementById('password-box').value
|
||||||
this.props.dispatch(actions.requestRevealSeed(password))
|
this.props.dispatch(actions.requestRevealSeed(password))
|
||||||
|
.then(() => this.props.history.push(INITIALIZE_BACKUP_PHRASE_ROUTE))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user