Merge pull request #3231 from danjm/MM-744-restore-from-seed-fix

[NewUI] Only open a new window on restore from seed if in extension view.
This commit is contained in:
Dan J Miller 2018-02-13 15:32:29 -03:30 committed by GitHub
commit eb61f69f92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -842,7 +842,6 @@ function showRestoreVault () {
function markPasswordForgotten () { function markPasswordForgotten () {
return (dispatch) => { return (dispatch) => {
dispatch(actions.showLoadingIndication())
return background.markPasswordForgotten(() => { return background.markPasswordForgotten(() => {
dispatch(actions.hideLoadingIndication()) dispatch(actions.hideLoadingIndication())
dispatch(actions.forgotPassword()) dispatch(actions.forgotPassword())
@ -853,7 +852,6 @@ function markPasswordForgotten () {
function unMarkPasswordForgotten () { function unMarkPasswordForgotten () {
return (dispatch) => { return (dispatch) => {
dispatch(actions.showLoadingIndication())
return background.unMarkPasswordForgotten(() => { return background.unMarkPasswordForgotten(() => {
dispatch(actions.hideLoadingIndication()) dispatch(actions.hideLoadingIndication())
dispatch(actions.forgotPassword()) dispatch(actions.forgotPassword())

View File

@ -6,6 +6,7 @@ const actions = require('./actions')
const getCaretCoordinates = require('textarea-caret') const getCaretCoordinates = require('textarea-caret')
const EventEmitter = require('events').EventEmitter const EventEmitter = require('events').EventEmitter
const { OLD_UI_NETWORK_TYPE } = require('../../app/scripts/config').enums const { OLD_UI_NETWORK_TYPE } = require('../../app/scripts/config').enums
const environmentType = require('../../app/scripts/lib/environment-type')
const Mascot = require('./components/mascot') const Mascot = require('./components/mascot')
@ -77,7 +78,9 @@ UnlockScreen.prototype.render = function () {
h('p.pointer', { h('p.pointer', {
onClick: () => { onClick: () => {
this.props.dispatch(actions.markPasswordForgotten()) this.props.dispatch(actions.markPasswordForgotten())
if (environmentType() === 'popup') {
global.platform.openExtensionInBrowser() global.platform.openExtensionInBrowser()
}
}, },
style: { style: {
fontSize: '0.8em', fontSize: '0.8em',