aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages/unlock.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-02-09 06:16:58 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-02-09 08:43:31 +0800
commiteb919f4710b37d09c9a3a68ed4c719e487cce9d9 (patch)
tree30e0c843a692ac10c637467b525f9bef0c795f48 /ui/app/components/pages/unlock.js
parent2fd9e58e612e9fe341c9107a677238a566e3c1b8 (diff)
parentf39222c9afd9dcab4c6234940eb9a9cb06dbc6f0 (diff)
downloadtangerine-wallet-browser-eb919f4710b37d09c9a3a68ed4c719e487cce9d9.tar.gz
tangerine-wallet-browser-eb919f4710b37d09c9a3a68ed4c719e487cce9d9.tar.zst
tangerine-wallet-browser-eb919f4710b37d09c9a3a68ed4c719e487cce9d9.zip
Merge branch 'uat-next' of https://github.com/MetaMask/metamask-extension into cb-254
Diffstat (limited to 'ui/app/components/pages/unlock.js')
-rw-r--r--ui/app/components/pages/unlock.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/ui/app/components/pages/unlock.js b/ui/app/components/pages/unlock.js
index 27e093a29..3d7a9091c 100644
--- a/ui/app/components/pages/unlock.js
+++ b/ui/app/components/pages/unlock.js
@@ -4,11 +4,11 @@ const { connect } = require('react-redux')
const h = require('react-hyperscript')
const { withRouter } = require('react-router-dom')
const { compose } = require('recompose')
-const { tryUnlockMetamask, forgotPassword } = require('../../actions')
+const { tryUnlockMetamask, forgotPassword, markPasswordForgotten } = require('../../actions')
const getCaretCoordinates = require('textarea-caret')
const EventEmitter = require('events').EventEmitter
const Mascot = require('../mascot')
-const { DEFAULT_ROUTE, RESTORE_VAULT_ROUTE } = require('../../routes')
+const { DEFAULT_ROUTE } = require('../../routes')
class UnlockScreen extends Component {
constructor (props) {
@@ -77,7 +77,7 @@ class UnlockScreen extends Component {
render () {
const { error } = this.state
- const { history } = this.props
+ const { markPasswordForgotten } = this.props
return (
h('.unlock-page.main-container', [
@@ -128,7 +128,10 @@ class UnlockScreen extends Component {
h('.flex-row.flex-center.flex-grow', [
h('p.pointer', {
- onClick: () => history.push(RESTORE_VAULT_ROUTE),
+ onClick: () => {
+ markPasswordForgotten()
+ global.platform.openExtensionInBrowser()
+ },
style: {
fontSize: '0.8em',
color: 'rgb(247, 134, 28)',
@@ -146,6 +149,7 @@ class UnlockScreen extends Component {
UnlockScreen.propTypes = {
forgotPassword: PropTypes.func,
tryUnlockMetamask: PropTypes.func,
+ markPasswordForgotten: PropTypes.func,
history: PropTypes.object,
isUnlocked: PropTypes.bool,
}
@@ -161,6 +165,7 @@ const mapDispatchToProps = dispatch => {
return {
forgotPassword: () => dispatch(forgotPassword()),
tryUnlockMetamask: password => dispatch(tryUnlockMetamask(password)),
+ markPasswordForgotten: () => dispatch(markPasswordForgotten()),
}
}