aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages/unlock.js
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2018-04-18 00:38:38 +0800
committerGitHub <noreply@github.com>2018-04-18 00:38:38 +0800
commitbdec1bc90b4f057eae77d2986b228c4ef2e7dfb8 (patch)
treea1b0877175b6555dcded6bb61bc07e1ada81e12d /ui/app/components/pages/unlock.js
parente4eb69dcc290a7e7eb27cab7ec57a8097345d81e (diff)
parentb0a105ce809b8b7e5e4431bd1ddecc523586cad0 (diff)
downloadtangerine-wallet-browser-bdec1bc90b4f057eae77d2986b228c4ef2e7dfb8.tar.gz
tangerine-wallet-browser-bdec1bc90b4f057eae77d2986b228c4ef2e7dfb8.tar.zst
tangerine-wallet-browser-bdec1bc90b4f057eae77d2986b228c4ef2e7dfb8.zip
Merge pull request #3995 from MetaMask/i3759-popup
Fix confirmation popup not always opening
Diffstat (limited to 'ui/app/components/pages/unlock.js')
-rw-r--r--ui/app/components/pages/unlock.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/app/components/pages/unlock.js b/ui/app/components/pages/unlock.js
index b3320da21..567b72518 100644
--- a/ui/app/components/pages/unlock.js
+++ b/ui/app/components/pages/unlock.js
@@ -11,7 +11,8 @@ const {
setNetworkEndpoints,
setFeatureFlag,
} = require('../../actions')
-const environmentType = require('../../../../app/scripts/lib/environment-type')
+const { ENVIRONMENT_TYPE_POPUP } = require('../../../../app/scripts/lib/enums')
+const { getEnvironmentType } = require('../../../../app/scripts/lib/util')
const getCaretCoordinates = require('textarea-caret')
const EventEmitter = require('events').EventEmitter
const Mascot = require('../mascot')
@@ -131,7 +132,7 @@ class UnlockScreen extends Component {
this.props.markPasswordForgotten()
this.props.history.push(RESTORE_VAULT_ROUTE)
- if (environmentType() === 'popup') {
+ if (getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP) {
global.platform.openExtensionInBrowser()
}
},