From 5e9dc74a59d2507f36e1cb5796f97982f5f4993d Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 13 Feb 2018 14:29:43 -0330 Subject: Remove isInBrowser method and use environment-type.js --- ui/app/unlock.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'ui') diff --git a/ui/app/unlock.js b/ui/app/unlock.js index db88fa9d0..13c3f1274 100644 --- a/ui/app/unlock.js +++ b/ui/app/unlock.js @@ -6,6 +6,7 @@ const actions = require('./actions') const getCaretCoordinates = require('textarea-caret') const EventEmitter = require('events').EventEmitter const { OLD_UI_NETWORK_TYPE } = require('../../app/scripts/config').enums +const environmentType = require('../../app/scripts/lib/environment-type') const Mascot = require('./components/mascot') @@ -77,12 +78,9 @@ UnlockScreen.prototype.render = function () { h('p.pointer', { onClick: () => { this.props.dispatch(actions.markPasswordForgotten()) - global.platform.isInBrowser() - .then((isInBrowser) => { - if (!isInBrowser) { - global.platform.openExtensionInBrowser() - } - }) + if (environmentType() === 'popup') { + global.platform.openExtensionInBrowser() + } }, style: { fontSize: '0.8em', -- cgit v1.2.3