diff options
author | Bruno <brunobar79@gmail.com> | 2018-05-17 10:38:51 +0800 |
---|---|---|
committer | Bruno <brunobar79@gmail.com> | 2018-05-17 10:38:51 +0800 |
commit | 3dd58463caef98c2cc1f068931624795a43912db (patch) | |
tree | b49a2e4feffd33e3b96d43ec29f2ca1071912e67 /ui/app/components/pending-tx | |
parent | 3180b69b974f8ffc0d6546a647725d1bf8539483 (diff) | |
parent | 708422432c634ffbd4c73388f980c43f766b3355 (diff) | |
download | tangerine-wallet-browser-3dd58463caef98c2cc1f068931624795a43912db.tar.gz tangerine-wallet-browser-3dd58463caef98c2cc1f068931624795a43912db.tar.zst tangerine-wallet-browser-3dd58463caef98c2cc1f068931624795a43912db.zip |
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'ui/app/components/pending-tx')
-rw-r--r-- | ui/app/components/pending-tx/confirm-send-ether.js | 14 | ||||
-rw-r--r-- | ui/app/components/pending-tx/index.js | 2 |
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', |