aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/app.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-03-30 07:54:00 +0800
committerkumavis <aaron@kumavis.me>2018-03-30 07:54:00 +0800
commitb49ad750dd87232553a72663af94bb2840c2f2ad (patch)
tree71e4002e6bc28c42ea227299752814d6f1f10486 /ui/app/app.js
parent93c123c6f52b28b525658492ce93fbcc30fc1e7c (diff)
parent9d4be1842e7c56e3bfde529ff555dcae8dec3dbd (diff)
downloadtangerine-wallet-browser-b49ad750dd87232553a72663af94bb2840c2f2ad.tar
tangerine-wallet-browser-b49ad750dd87232553a72663af94bb2840c2f2ad.tar.gz
tangerine-wallet-browser-b49ad750dd87232553a72663af94bb2840c2f2ad.tar.bz2
tangerine-wallet-browser-b49ad750dd87232553a72663af94bb2840c2f2ad.tar.lz
tangerine-wallet-browser-b49ad750dd87232553a72663af94bb2840c2f2ad.tar.xz
tangerine-wallet-browser-b49ad750dd87232553a72663af94bb2840c2f2ad.tar.zst
tangerine-wallet-browser-b49ad750dd87232553a72663af94bb2840c2f2ad.zip
Merge branch 'master' of github.com:MetaMask/metamask-extension into ci-artifacts
Diffstat (limited to 'ui/app/app.js')
-rw-r--r--ui/app/app.js32
1 files changed, 19 insertions, 13 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index d658cf809..0b7a7a1e0 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -1,7 +1,8 @@
const inherits = require('util').inherits
const Component = require('react').Component
-const connect = require('./metamask-connect')
+const connect = require('react-redux').connect
const h = require('react-hyperscript')
+const PropTypes = require('prop-types')
const actions = require('./actions')
const classnames = require('classnames')
@@ -45,8 +46,13 @@ const QrView = require('./components/qr-code')
// Global Modals
const Modal = require('./components/modals/index').Modal
+App.contextTypes = {
+ t: PropTypes.func,
+}
+
module.exports = connect(mapStateToProps, mapDispatchToProps)(App)
+
inherits(App, Component)
function App () { Component.call(this) }
@@ -293,8 +299,8 @@ App.prototype.renderAppBar = function () {
// 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')),
]),
]),
@@ -556,15 +562,15 @@ App.prototype.getConnectingLabel = function () {
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
@@ -577,15 +583,15 @@ App.prototype.getNetworkName = function () {
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