diff options
Diffstat (limited to 'ui/app/app.js')
-rw-r--r-- | ui/app/app.js | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/ui/app/app.js b/ui/app/app.js index 5d47a4189..af2b70353 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -1,9 +1,10 @@ const { Component } = require('react') const PropTypes = require('prop-types') -const connect = require('./metamask-connect') +const connect = require('react-redux').connect const { Route, Switch, Redirect, withRouter } = require('react-router-dom') const { compose } = require('recompose') const h = require('react-hyperscript') +const PropTypes = require('prop-types') const actions = require('./actions') const classnames = require('classnames') @@ -296,8 +297,8 @@ class App extends Component { // metamask name h('.flex-row', [ - h('h1', this.props.t('appName')), - h('div.beta-label', this.props.t('beta')), + h('h1', this.context.t('appName')), + h('div.beta-label', this.context.t('beta')), ]), ]), @@ -322,7 +323,7 @@ class App extends Component { ]), - isUnlocked && h('div.account-menu__icon', { onClick: this.props.toggleAccountMenu }, [ + isUnlocked && h('div.account-menu__icon', { onClick: this.context.toggleAccountMenu }, [ h(Identicon, { address: this.props.selectedAddress, diameter: 32, @@ -575,15 +576,15 @@ class App extends Component { let name if (providerName === 'mainnet') { - name = this.props.t('connectingToMainnet') + name = this.context.t('connectingToMainnet') } else if (providerName === 'ropsten') { - name = this.props.t('connectingToRopsten') + name = this.context.t('connectingToRopsten') } else if (providerName === 'kovan') { - name = this.props.t('connectingToRopsten') + name = this.context.t('connectingToRopsten') } else if (providerName === 'rinkeby') { - name = this.props.t('connectingToRinkeby') + name = this.context.t('connectingToRinkeby') } else { - name = this.props.t('connectingToUnknown') + name = this.context.t('connectingToUnknown') } return name @@ -596,15 +597,15 @@ class App extends Component { let name if (providerName === 'mainnet') { - name = this.props.t('mainnet') + name = this.context.t('mainnet') } else if (providerName === 'ropsten') { - name = this.props.t('ropsten') + name = this.context.t('ropsten') } else if (providerName === 'kovan') { - name = this.props.t('kovan') + name = this.context.t('kovan') } else if (providerName === 'rinkeby') { - name = this.props.t('rinkeby') + name = this.context.t('rinkeby') } else { - name = this.props.t('unknownNetwork') + name = this.context.t('unknownNetwork') } return name |