diff options
author | Thomas <thomas.b.huang@gmail.com> | 2018-05-17 15:01:36 +0800 |
---|---|---|
committer | Thomas <thomas.b.huang@gmail.com> | 2018-05-17 15:01:36 +0800 |
commit | 770379c3da4f625b265d752d45423d179dfc0b9d (patch) | |
tree | db908a8fa5f4979ffcac4436d2227294d0df94e4 /ui/app/components/pending-tx/confirm-send-ether.js | |
parent | 5e80bc4cb93277c8b3952345a6cb4cc055248b94 (diff) | |
parent | 708422432c634ffbd4c73388f980c43f766b3355 (diff) | |
download | tangerine-wallet-browser-770379c3da4f625b265d752d45423d179dfc0b9d.tar.gz tangerine-wallet-browser-770379c3da4f625b265d752d45423d179dfc0b9d.tar.zst tangerine-wallet-browser-770379c3da4f625b265d752d45423d179dfc0b9d.zip |
Merge branch 'develop' into testing
Diffstat (limited to 'ui/app/components/pending-tx/confirm-send-ether.js')
-rw-r--r-- | ui/app/components/pending-tx/confirm-send-ether.js | 14 |
1 files changed, 13 insertions, 1 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), |