aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/keychains/hd/restore-vault.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/keychains/hd/restore-vault.js')
-rw-r--r--ui/app/keychains/hd/restore-vault.js27
1 files changed, 13 insertions, 14 deletions
diff --git a/ui/app/keychains/hd/restore-vault.js b/ui/app/keychains/hd/restore-vault.js
index 5e4e004cf..f47a2641a 100644
--- a/ui/app/keychains/hd/restore-vault.js
+++ b/ui/app/keychains/hd/restore-vault.js
@@ -1,8 +1,7 @@
const inherits = require('util').inherits
const PersistentForm = require('../../../lib/persistent-form')
-const connect = require('react-redux').connect
+const connect = require('../../metamask-connect')
const h = require('react-hyperscript')
-const t = require('../../../i18n')
const actions = require('../../actions')
module.exports = connect(mapStateToProps)(RestoreVaultScreen)
@@ -37,23 +36,23 @@ RestoreVaultScreen.prototype.render = function () {
padding: 6,
},
}, [
- t('restoreVault'),
+ this.props.t('restoreVault'),
]),
// wallet seed entry
- h('h3', t('walletSeed')),
+ h('h3', this.props.t('walletSeed')),
h('textarea.twelve-word-phrase.letter-spacey', {
dataset: {
persistentFormId: 'wallet-seed',
},
- placeholder: t('secretPhrase'),
+ placeholder: this.props.t('secretPhrase'),
}),
// password
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box',
- placeholder: t('newPassword8Chars'),
+ placeholder: this.props.t('newPassword8Chars'),
dataset: {
persistentFormId: 'password',
},
@@ -67,7 +66,7 @@ RestoreVaultScreen.prototype.render = function () {
h('input.large-input.letter-spacey', {
type: 'password',
id: 'password-box-confirm',
- placeholder: t('confirmPassword'),
+ placeholder: this.props.t('confirmPassword'),
onKeyPress: this.createOnEnter.bind(this),
dataset: {
persistentFormId: 'password-confirmation',
@@ -97,7 +96,7 @@ RestoreVaultScreen.prototype.render = function () {
style: {
textTransform: 'uppercase',
},
- }, t('cancel')),
+ }, this.props.t('cancel')),
// submit
h('button.primary', {
@@ -105,7 +104,7 @@ RestoreVaultScreen.prototype.render = function () {
style: {
textTransform: 'uppercase',
},
- }, t('ok')),
+ }, this.props.t('ok')),
]),
])
)
@@ -136,13 +135,13 @@ RestoreVaultScreen.prototype.createNewVaultAndRestore = function () {
var passwordConfirmBox = document.getElementById('password-box-confirm')
var passwordConfirm = passwordConfirmBox.value
if (password.length < 8) {
- this.warning = t('passwordNotLongEnough')
+ this.warning = this.props.t('passwordNotLongEnough')
this.props.dispatch(actions.displayWarning(this.warning))
return
}
if (password !== passwordConfirm) {
- this.warning = t('passwordsDontMatch')
+ this.warning = this.props.t('passwordsDontMatch')
this.props.dispatch(actions.displayWarning(this.warning))
return
}
@@ -152,18 +151,18 @@ RestoreVaultScreen.prototype.createNewVaultAndRestore = function () {
// true if the string has more than a space between words.
if (seed.split(' ').length > 1) {
- this.warning = t('spaceBetween')
+ this.warning = this.props.t('spaceBetween')
this.props.dispatch(actions.displayWarning(this.warning))
return
}
// true if seed contains a character that is not between a-z or a space
if (!seed.match(/^[a-z ]+$/)) {
- this.warning = t('loweCaseWords')
+ this.warning = this.props.t('loweCaseWords')
this.props.dispatch(actions.displayWarning(this.warning))
return
}
if (seed.split(' ').length !== 12) {
- this.warning = t('seedPhraseReq')
+ this.warning = this.props.t('seedPhraseReq')
this.props.dispatch(actions.displayWarning(this.warning))
return
}