aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/accounts/import/private-key.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/accounts/import/private-key.js')
-rw-r--r--ui/app/accounts/import/private-key.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/ui/app/accounts/import/private-key.js b/ui/app/accounts/import/private-key.js
index bdf581b01..006131bdc 100644
--- a/ui/app/accounts/import/private-key.js
+++ b/ui/app/accounts/import/private-key.js
@@ -1,11 +1,17 @@
const inherits = require('util').inherits
const Component = require('react').Component
const h = require('react-hyperscript')
-const connect = require('../../metamask-connect')
+const PropTypes = require('prop-types')
+const connect = require('react-redux').connect
const actions = require('../../actions')
+PrivateKeyImportView.contextTypes = {
+ t: PropTypes.func,
+}
+
module.exports = connect(mapStateToProps, mapDispatchToProps)(PrivateKeyImportView)
+
function mapStateToProps (state) {
return {
error: state.appState.warning,
@@ -33,7 +39,7 @@ PrivateKeyImportView.prototype.render = function () {
return (
h('div.new-account-import-form__private-key', [
- h('span.new-account-create-form__instruction', this.props.t('pastePrivateKey')),
+ h('span.new-account-create-form__instruction', this.context.t('pastePrivateKey')),
h('div.new-account-import-form__private-key-password-container', [
@@ -50,13 +56,13 @@ PrivateKeyImportView.prototype.render = function () {
h('button.btn-secondary--lg.new-account-create-form__button', {
onClick: () => goHome(),
}, [
- this.props.t('cancel'),
+ this.context.t('cancel'),
]),
h('button.btn-primary--lg.new-account-create-form__button', {
onClick: () => this.createNewKeychain(),
}, [
- this.props.t('import'),
+ this.context.t('import'),
]),
]),