aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/account-menu/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/account-menu/index.js')
-rw-r--r--ui/app/components/account-menu/index.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js
index 994be6a15..7927b80d5 100644
--- a/ui/app/components/account-menu/index.js
+++ b/ui/app/components/account-menu/index.js
@@ -1,6 +1,6 @@
const inherits = require('util').inherits
const Component = require('react').Component
-const connect = require('react-redux').connect
+const connect = require('../../metamask-connect')
const { compose } = require('recompose')
const { withRouter } = require('react-router-dom')
const h = require('react-hyperscript')
@@ -8,7 +8,6 @@ const actions = require('../../actions')
const { Menu, Item, Divider, CloseArea } = require('../dropdowns/components/menu')
const Identicon = require('../identicon')
const { formatBalance } = require('../../util')
-const t = require('../../../i18n')
const {
SETTINGS_ROUTE,
INFO_ROUTE,
@@ -75,13 +74,13 @@ AccountMenu.prototype.render = function () {
h(Item, {
className: 'account-menu__header',
}, [
- t('myAccounts'),
+ this.props.t('myAccounts'),
h('button.account-menu__logout-button', {
onClick: () => {
lockMetamask()
history.push(DEFAULT_ROUTE)
},
- }, t('logout')),
+ }, this.props.t('logout')),
]),
h(Divider),
h('div.account-menu__accounts', this.renderAccounts()),
@@ -92,7 +91,7 @@ AccountMenu.prototype.render = function () {
history.push(NEW_ACCOUNT_ROUTE)
},
icon: h('img.account-menu__item-icon', { src: 'images/plus-btn-white.svg' }),
- text: t('createAccount'),
+ text: this.props.t('createAccount'),
}),
h(Item, {
onClick: () => {
@@ -100,7 +99,7 @@ AccountMenu.prototype.render = function () {
history.push(IMPORT_ACCOUNT_ROUTE)
},
icon: h('img.account-menu__item-icon', { src: 'images/import-account.svg' }),
- text: t('importAccount'),
+ text: this.props.t('importAccount'),
}),
h(Divider),
h(Item, {
@@ -109,7 +108,7 @@ AccountMenu.prototype.render = function () {
history.push(INFO_ROUTE)
},
icon: h('img', { src: 'images/mm-info-icon.svg' }),
- text: t('infoHelp'),
+ text: this.props.t('infoHelp'),
}),
h(Item, {
onClick: () => {
@@ -117,7 +116,7 @@ AccountMenu.prototype.render = function () {
history.push(SETTINGS_ROUTE)
},
icon: h('img.account-menu__item-icon', { src: 'images/settings.svg' }),
- text: t('settings'),
+ text: this.props.t('settings'),
}),
])
}
@@ -175,6 +174,6 @@ AccountMenu.prototype.indicateIfLoose = function (keyring) {
try { // Sometimes keyrings aren't loaded yet:
const type = keyring.type
const isLoose = type !== 'HD Key Tree'
- return isLoose ? h('.keyring-label.allcaps', t('imported')) : null
+ return isLoose ? h('.keyring-label.allcaps', this.props.t('imported')) : null
} catch (e) { return }
}