diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-05-15 05:34:10 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-05-15 06:03:04 +0800 |
commit | 5561937773b4e59e3df9df385693680e17e6b8c0 (patch) | |
tree | 5e048b25dea0ce93cdc6833acfff030ac9bbfcc1 /ui/app/components/pending-tx/confirm-send-ether.js | |
parent | 6bd1b21d3b8f74c44214f814c3fe1c8770ab9e2d (diff) | |
download | tangerine-wallet-browser-5561937773b4e59e3df9df385693680e17e6b8c0.tar tangerine-wallet-browser-5561937773b4e59e3df9df385693680e17e6b8c0.tar.gz tangerine-wallet-browser-5561937773b4e59e3df9df385693680e17e6b8c0.tar.bz2 tangerine-wallet-browser-5561937773b4e59e3df9df385693680e17e6b8c0.tar.lz tangerine-wallet-browser-5561937773b4e59e3df9df385693680e17e6b8c0.tar.xz tangerine-wallet-browser-5561937773b4e59e3df9df385693680e17e6b8c0.tar.zst tangerine-wallet-browser-5561937773b4e59e3df9df385693680e17e6b8c0.zip |
Fix account and network dropdowns in confirm screen
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), |