aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/ens-input.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-03-28 09:41:45 +0800
committerGitHub <noreply@github.com>2018-03-28 09:41:45 +0800
commit0582fdb617a23cc56e9e08460f09d86769599fc1 (patch)
tree5daf844ac1fd0c9d1f683b479184509ebb96c850 /ui/app/components/ens-input.js
parentb6b18339e2de92afd2fb5364ec5bc4c29b4d10a3 (diff)
parentb4ec68b2d4b6713e0a203df88eb4a8982c2cf2c6 (diff)
downloadtangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.tar
tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.tar.gz
tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.tar.bz2
tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.tar.lz
tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.tar.xz
tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.tar.zst
tangerine-wallet-browser-0582fdb617a23cc56e9e08460f09d86769599fc1.zip
Merge pull request #3609 from MetaMask/i18n-translator-redux
Handle i18n with redux.
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,
})
}