aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/ens-input.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/ens-input.js')
-rw-r--r--ui/app/components/ens-input.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/ui/app/components/ens-input.js b/ui/app/components/ens-input.js
index 1b2d4009d..922f24d40 100644
--- a/ui/app/components/ens-input.js
+++ b/ui/app/components/ens-input.js
@@ -8,11 +8,10 @@ const ENS = require('ethjs-ens')
const networkMap = require('ethjs-ens/lib/network-map.json')
const ensRE = /.+\..+$/
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
-const t = require('../../i18n')
+const connect = require('../metamask-connect')
const ToAutoComplete = require('./send/to-autocomplete')
-
-module.exports = EnsInput
+module.exports = connect()(EnsInput)
inherits(EnsInput, Component)
function EnsInput () {
@@ -71,13 +70,13 @@ EnsInput.prototype.lookupEnsName = function (recipient) {
log.info(`ENS attempting to resolve name: ${recipient}`)
this.ens.lookup(recipient.trim())
.then((address) => {
- if (address === ZERO_ADDRESS) throw new Error(t('noAddressForName'))
+ if (address === ZERO_ADDRESS) throw new Error(this.props.t('noAddressForName'))
if (address !== ensResolution) {
this.setState({
loadingEns: false,
ensResolution: address,
nickname: recipient.trim(),
- hoverText: address + '\n' + t('clickCopy'),
+ hoverText: address + '\n' + this.props.t('clickCopy'),
ensFailure: false,
})
}