diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-04-13 05:17:36 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-04-24 01:18:05 +0800 |
commit | 9e41f58af2f236389f11bd1d401da73c0d709b2d (patch) | |
tree | cf3cb4dbc49e4ac9fa4a5d8c4d08c32e9a6e8052 /ui/app | |
parent | 74c419f9b65841c2966d1fe3b7414bf11e09e0d8 (diff) | |
download | tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.tar tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.tar.gz tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.tar.bz2 tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.tar.lz tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.tar.xz tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.tar.zst tangerine-wallet-browser-9e41f58af2f236389f11bd1d401da73c0d709b2d.zip |
Clean up network config
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/components/buy-button-subview.js | 4 | ||||
-rw-r--r-- | ui/app/components/modals/buy-options-modal.js | 4 | ||||
-rw-r--r-- | ui/app/components/modals/deposit-ether-modal.js | 4 | ||||
-rw-r--r-- | ui/app/components/pages/settings/settings.js | 2 | ||||
-rw-r--r-- | ui/app/components/pages/unlock.js | 2 | ||||
-rw-r--r-- | ui/app/first-time/init-menu.js | 2 | ||||
-rw-r--r-- | ui/app/reducers/metamask.js | 2 | ||||
-rw-r--r-- | ui/app/select-app.js | 2 | ||||
-rw-r--r-- | ui/app/unlock.js | 2 |
9 files changed, 12 insertions, 12 deletions
diff --git a/ui/app/components/buy-button-subview.js b/ui/app/components/buy-button-subview.js index 9ac565cf4..fda7c3e17 100644 --- a/ui/app/components/buy-button-subview.js +++ b/ui/app/components/buy-button-subview.js @@ -9,7 +9,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') BuyButtonSubview.contextTypes = { t: PropTypes.func, @@ -148,7 +148,7 @@ BuyButtonSubview.prototype.primarySubview = function () { case '3': case '4': case '42': - const networkName = networkNames[network] + const networkName = getNetworkDisplayName(network) const label = `${networkName} ${this.context.t('testFaucet')}` return ( h('div.flex-column', { diff --git a/ui/app/components/modals/buy-options-modal.js b/ui/app/components/modals/buy-options-modal.js index d871e7516..c70510b5f 100644 --- a/ui/app/components/modals/buy-options-modal.js +++ b/ui/app/components/modals/buy-options-modal.js @@ -4,7 +4,7 @@ const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect const actions = require('../../actions') -const networkNames = require('../../../../app/scripts/config.js').networkNames +const { getNetworkDisplayName } = require('../../../../app/scripts/controllers/network/util') function mapStateToProps (state) { return { @@ -52,7 +52,7 @@ BuyOptions.prototype.renderModalContentOption = function (title, header, onClick BuyOptions.prototype.render = function () { const { network, toCoinbase, address, toFaucet } = this.props const isTestNetwork = ['3', '4', '42'].find(n => n === network) - const networkName = networkNames[network] + const networkName = getNetworkDisplayName(network) return h('div', {}, [ h('div.buy-modal-content.transfers-subview', { diff --git a/ui/app/components/modals/deposit-ether-modal.js b/ui/app/components/modals/deposit-ether-modal.js index 0dc611f50..ad5f9b695 100644 --- a/ui/app/components/modals/deposit-ether-modal.js +++ b/ui/app/components/modals/deposit-ether-modal.js @@ -4,7 +4,7 @@ const h = require('react-hyperscript') const inherits = require('util').inherits const connect = require('react-redux').connect const actions = require('../../actions') -const networkNames = require('../../../../app/scripts/config.js').networkNames +const { getNetworkDisplayName } = require('../../../../app/scripts/controllers/network/util') const ShapeshiftForm = require('../shapeshift-form') let DIRECT_DEPOSIT_ROW_TITLE @@ -122,7 +122,7 @@ DepositEtherModal.prototype.render = function () { const { buyingWithShapeshift } = this.state const isTestNetwork = ['3', '4', '42'].find(n => n === network) - const networkName = networkNames[network] + const networkName = getNetworkDisplayName(network) return h('div.page-container.page-container--full-width.page-container--full-height', {}, [ diff --git a/ui/app/components/pages/settings/settings.js b/ui/app/components/pages/settings/settings.js index 05a7379fb..bdefe56f8 100644 --- a/ui/app/components/pages/settings/settings.js +++ b/ui/app/components/pages/settings/settings.js @@ -12,7 +12,7 @@ const SimpleDropdown = require('../../dropdowns/simple-dropdown') const ToggleButton = require('react-toggle-button') const { REVEAL_SEED_ROUTE } = require('../../../routes') const locales = require('../../../../../app/_locales/index.json') -const { OLD_UI_NETWORK_TYPE } = require('../../../../../app/scripts/config').enums +const { OLD_UI_NETWORK_TYPE } = require('../../../../../app/scripts/controllers/network/enums') const getInfuraCurrencyOptions = () => { const sortedCurrencies = infuraCurrencies.objects.sort((a, b) => { diff --git a/ui/app/components/pages/unlock.js b/ui/app/components/pages/unlock.js index 567b72518..30144b978 100644 --- a/ui/app/components/pages/unlock.js +++ b/ui/app/components/pages/unlock.js @@ -16,7 +16,7 @@ const { getEnvironmentType } = require('../../../../app/scripts/lib/util') const getCaretCoordinates = require('textarea-caret') const EventEmitter = require('events').EventEmitter const Mascot = require('../mascot') -const { OLD_UI_NETWORK_TYPE } = require('../../../../app/scripts/config').enums +const { OLD_UI_NETWORK_TYPE } = require('../../../../app/scripts/controllers/network/enums') const { DEFAULT_ROUTE, RESTORE_VAULT_ROUTE } = require('../../routes') class UnlockScreen extends Component { diff --git a/ui/app/first-time/init-menu.js b/ui/app/first-time/init-menu.js index 3df040922..6cb548bb9 100644 --- a/ui/app/first-time/init-menu.js +++ b/ui/app/first-time/init-menu.js @@ -10,7 +10,7 @@ const getCaretCoordinates = require('textarea-caret') const { RESTORE_VAULT_ROUTE, DEFAULT_ROUTE } = require('../routes') const { getEnvironmentType } = require('../../../app/scripts/lib/util') const { ENVIRONMENT_TYPE_POPUP } = require('../../../app/scripts/lib/enums') -const { OLD_UI_NETWORK_TYPE } = require('../../../app/scripts/config').enums +const { OLD_UI_NETWORK_TYPE } = require('../../../app/scripts/controllers/network/enums') class InitializeMenuScreen extends Component { constructor (props) { diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index 5f965fbe0..bb35cf990 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -3,7 +3,7 @@ const actions = require('../actions') const MetamascaraPlatform = require('../../../app/scripts/platforms/window') const { getEnvironmentType } = require('../../../app/scripts/lib/util') const { ENVIRONMENT_TYPE_POPUP } = require('../../../app/scripts/lib/enums') -const { OLD_UI_NETWORK_TYPE } = require('../../../app/scripts/config').enums +const { OLD_UI_NETWORK_TYPE } = require('../../../app/scripts/controllers/network/enums') module.exports = reduceMetamask diff --git a/ui/app/select-app.js b/ui/app/select-app.js index d1565e2fb..808f9ba56 100644 --- a/ui/app/select-app.js +++ b/ui/app/select-app.js @@ -7,7 +7,7 @@ const App = require('./app') const OldApp = require('../../old-ui/app/app') const { autoAddToBetaUI } = require('./selectors') const { setFeatureFlag, setNetworkEndpoints } = require('./actions') -const { BETA_UI_NETWORK_TYPE } = require('../../app/scripts/config').enums +const { BETA_UI_NETWORK_TYPE } = require('../../app/scripts/controllers/network/enums') const I18nProvider = require('./i18n-provider') function mapStateToProps (state) { diff --git a/ui/app/unlock.js b/ui/app/unlock.js index 1325656af..099e5f9c6 100644 --- a/ui/app/unlock.js +++ b/ui/app/unlock.js @@ -6,7 +6,7 @@ const connect = require('react-redux').connect const actions = require('./actions') const getCaretCoordinates = require('textarea-caret') const EventEmitter = require('events').EventEmitter -const { OLD_UI_NETWORK_TYPE } = require('../../app/scripts/config').enums +const { OLD_UI_NETWORK_TYPE } = require('../../app/scripts/controllers/network/enums') const { getEnvironmentType } = require('../../app/scripts/lib/util') const { ENVIRONMENT_TYPE_POPUP } = require('../../app/scripts/lib/enums') |