aboutsummaryrefslogtreecommitdiffstats
path: root/old-ui/app
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-05-01 10:42:57 +0800
committerDan <danjm.com@gmail.com>2018-05-01 10:42:57 +0800
commit2f78fffbdbb0e41d73bcde2c15c88fff095614b7 (patch)
tree24d68a267304d085ee1b7c705ce5ade53c9439c3 /old-ui/app
parentf96c13d616e429447ac0a6a24c6aeee902162b88 (diff)
parent954394f81090b1a6a4afe55243caa3671b88addc (diff)
downloadtangerine-wallet-browser-2f78fffbdbb0e41d73bcde2c15c88fff095614b7.tar.gz
tangerine-wallet-browser-2f78fffbdbb0e41d73bcde2c15c88fff095614b7.tar.zst
tangerine-wallet-browser-2f78fffbdbb0e41d73bcde2c15c88fff095614b7.zip
Merge branch 'i3725-refactor-send-component-' into i3725-refactor-send-component-2
Diffstat (limited to 'old-ui/app')
-rw-r--r--old-ui/app/app.js3
-rw-r--r--old-ui/app/components/buy-button-subview.js4
-rw-r--r--old-ui/app/components/ens-input.js1
-rw-r--r--old-ui/app/components/pending-tx.js1
-rw-r--r--old-ui/app/components/token-list.js1
-rw-r--r--old-ui/app/conf-tx.js6
6 files changed, 11 insertions, 5 deletions
diff --git a/old-ui/app/app.js b/old-ui/app/app.js
index 37611987f..3aa845b3a 100644
--- a/old-ui/app/app.js
+++ b/old-ui/app/app.js
@@ -3,6 +3,7 @@ const Component = require('react').Component
const connect = require('react-redux').connect
const h = require('react-hyperscript')
const actions = require('../../ui/app/actions')
+const log = require('loglevel')
// mascara
const MascaraFirstTime = require('../../mascara/src/app/first-time').default
const MascaraBuyEtherScreen = require('../../mascara/src/app/first-time/buy-ether-screen').default
@@ -34,7 +35,7 @@ const HDCreateVaultComplete = require('./keychains/hd/create-vault-complete')
const HDRestoreVaultScreen = require('./keychains/hd/restore-vault')
const RevealSeedConfirmation = require('./keychains/hd/recover-seed/confirmation')
const AccountDropdowns = require('./components/account-dropdowns').AccountDropdowns
-const { BETA_UI_NETWORK_TYPE } = require('../../app/scripts/config').enums
+const { BETA_UI_NETWORK_TYPE } = require('../../app/scripts/controllers/network/enums')
module.exports = connect(mapStateToProps)(App)
diff --git a/old-ui/app/components/buy-button-subview.js b/old-ui/app/components/buy-button-subview.js
index 56d173839..8bb73ae3e 100644
--- a/old-ui/app/components/buy-button-subview.js
+++ b/old-ui/app/components/buy-button-subview.js
@@ -8,7 +8,7 @@ const ShapeshiftForm = require('./shapeshift-form')
const Loading = require('./loading')
const AccountPanel = require('./account-panel')
const RadioList = require('./custom-radio-list')
-const networkNames = require('../../../app/scripts/config.js').networkNames
+const { getNetworkDisplayName } = require('../../../app/scripts/controllers/network/util')
module.exports = connect(mapStateToProps)(BuyButtonSubview)
@@ -142,7 +142,7 @@ BuyButtonSubview.prototype.primarySubview = function () {
case '3':
case '4':
case '42':
- const networkName = networkNames[network]
+ const networkName = getNetworkDisplayName(network)
const label = `${networkName} Test Faucet`
return (
h('div.flex-column', {
diff --git a/old-ui/app/components/ens-input.js b/old-ui/app/components/ens-input.js
index c85a23514..d09c30644 100644
--- a/old-ui/app/components/ens-input.js
+++ b/old-ui/app/components/ens-input.js
@@ -8,6 +8,7 @@ const ENS = require('ethjs-ens')
const networkMap = require('ethjs-ens/lib/network-map.json')
const ensRE = /.+\..+$/
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
+const log = require('loglevel')
module.exports = EnsInput
diff --git a/old-ui/app/components/pending-tx.js b/old-ui/app/components/pending-tx.js
index 7f63d9fdf..cd4189fc4 100644
--- a/old-ui/app/components/pending-tx.js
+++ b/old-ui/app/components/pending-tx.js
@@ -3,6 +3,7 @@ const h = require('react-hyperscript')
const inherits = require('util').inherits
const actions = require('../../../ui/app/actions')
const clone = require('clone')
+const log = require('loglevel')
const ethUtil = require('ethereumjs-util')
const BN = ethUtil.BN
diff --git a/old-ui/app/components/token-list.js b/old-ui/app/components/token-list.js
index 149733b89..e20594b61 100644
--- a/old-ui/app/components/token-list.js
+++ b/old-ui/app/components/token-list.js
@@ -3,6 +3,7 @@ const h = require('react-hyperscript')
const inherits = require('util').inherits
const TokenTracker = require('eth-token-tracker')
const TokenCell = require('./token-cell.js')
+const log = require('loglevel')
module.exports = TokenList
diff --git a/old-ui/app/conf-tx.js b/old-ui/app/conf-tx.js
index 1bb8eb97c..dc1dc0538 100644
--- a/old-ui/app/conf-tx.js
+++ b/old-ui/app/conf-tx.js
@@ -6,7 +6,9 @@ const actions = require('../../ui/app/actions')
const NetworkIndicator = require('./components/network')
const LoadingIndicator = require('./components/loading')
const txHelper = require('../lib/tx-helper')
-const isPopupOrNotification = require('../../app/scripts/lib/is-popup-or-notification')
+const log = require('loglevel')
+const { ENVIRONMENT_TYPE_NOTIFICATION } = require('../../app/scripts/lib/enums')
+const { getEnvironmentType } = require('../../app/scripts/lib/util')
const PendingTx = require('./components/pending-tx')
const PendingMsg = require('./components/pending-msg')
@@ -50,7 +52,7 @@ ConfirmTxScreen.prototype.render = function () {
var txData = unconfTxList[props.index] || {}
var txParams = txData.params || {}
- var isNotification = isPopupOrNotification() === 'notification'
+ var isNotification = getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_NOTIFICATION
log.info(`rendering a combined ${unconfTxList.length} unconf msg & txs`)
if (unconfTxList.length === 0) return h(Loading, { isLoading: true })