aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pending-tx
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/pending-tx')
-rw-r--r--ui/app/components/pending-tx/confirm-send-ether.js14
-rw-r--r--ui/app/components/pending-tx/index.js2
2 files changed, 14 insertions, 2 deletions
diff --git a/ui/app/components/pending-tx/confirm-send-ether.js b/ui/app/components/pending-tx/confirm-send-ether.js
index 16dbd273b..c07c96ccc 100644
--- a/ui/app/components/pending-tx/confirm-send-ether.js
+++ b/ui/app/components/pending-tx/confirm-send-ether.js
@@ -28,6 +28,10 @@ const currencies = require('currency-formatter/currencies')
const { MIN_GAS_PRICE_HEX } = require('../send/send-constants')
const { SEND_ROUTE, DEFAULT_ROUTE } = require('../../routes')
+const {
+ ENVIRONMENT_TYPE_POPUP,
+ ENVIRONMENT_TYPE_NOTIFICATION,
+} = require('../../../../app/scripts/lib/enums')
ConfirmSendEther.contextTypes = {
t: PropTypes.func,
@@ -293,6 +297,14 @@ ConfirmSendEther.prototype.editTransaction = function (txMeta) {
history.push(SEND_ROUTE)
}
+ConfirmSendEther.prototype.renderNetworkDisplay = function () {
+ const windowType = window.METAMASK_UI_TYPE
+
+ return (windowType === ENVIRONMENT_TYPE_NOTIFICATION || windowType === ENVIRONMENT_TYPE_POPUP)
+ ? h(NetworkDisplay)
+ : null
+}
+
ConfirmSendEther.prototype.render = function () {
const {
currentCurrency,
@@ -358,7 +370,7 @@ ConfirmSendEther.prototype.render = function () {
visibility: !txMeta.lastGasPrice ? 'initial' : 'hidden',
},
}, 'Edit'),
- window.METAMASK_UI_TYPE === 'notification' && h(NetworkDisplay),
+ this.renderNetworkDisplay(),
]),
h('.page-container__title', title),
h('.page-container__subtitle', subtitle),
diff --git a/ui/app/components/pending-tx/index.js b/ui/app/components/pending-tx/index.js
index fb409cb92..893538bcf 100644
--- a/ui/app/components/pending-tx/index.js
+++ b/ui/app/components/pending-tx/index.js
@@ -12,7 +12,7 @@ const { getSymbolAndDecimals } = require('../../token-util')
const ConfirmSendEther = require('./confirm-send-ether')
const ConfirmSendToken = require('./confirm-send-token')
const ConfirmDeployContract = require('./confirm-deploy-contract')
-const Loading = require('../loading')
+const Loading = require('../loading-screen')
const TX_TYPES = {
DEPLOY_CONTRACT: 'deploy_contract',