diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-03-10 07:10:27 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2017-03-10 07:10:27 +0800 |
commit | b34ee4daa145c1d4eea2da6fd0cba0763e5c6483 (patch) | |
tree | 70ce17e4267ed6e126f5a5eace76f0d40c1aa1e9 /ui/app/components/ens-input.js | |
parent | b296640f1b2e8cb808297715146a9370ff4f41ec (diff) | |
download | tangerine-wallet-browser-b34ee4daa145c1d4eea2da6fd0cba0763e5c6483.tar tangerine-wallet-browser-b34ee4daa145c1d4eea2da6fd0cba0763e5c6483.tar.gz tangerine-wallet-browser-b34ee4daa145c1d4eea2da6fd0cba0763e5c6483.tar.bz2 tangerine-wallet-browser-b34ee4daa145c1d4eea2da6fd0cba0763e5c6483.tar.lz tangerine-wallet-browser-b34ee4daa145c1d4eea2da6fd0cba0763e5c6483.tar.xz tangerine-wallet-browser-b34ee4daa145c1d4eea2da6fd0cba0763e5c6483.tar.zst tangerine-wallet-browser-b34ee4daa145c1d4eea2da6fd0cba0763e5c6483.zip |
Allow for adding recently used addresses to address book.
Diffstat (limited to 'ui/app/components/ens-input.js')
-rw-r--r-- | ui/app/components/ens-input.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ui/app/components/ens-input.js b/ui/app/components/ens-input.js index 2b224fa3e..06efe6652 100644 --- a/ui/app/components/ens-input.js +++ b/ui/app/components/ens-input.js @@ -59,6 +59,12 @@ EnsInput.prototype.render = function () { label: identity.name, }) }), + props.addressBook.map((identity) => { + return h('option', { + value: identity.address, + label: identity.name, + }) + }), ]), this.ensIcon(), ]) @@ -94,11 +100,13 @@ EnsInput.prototype.lookupEnsName = function () { this.setState({ loadingEns: false, ensResolution: address, + nickname: recipient.trim(), hoverText: address + '\nClick to Copy', }) } }) .catch((reason) => { + log.error(reason) return this.setState({ loadingEns: false, ensFailure: true, @@ -109,10 +117,11 @@ EnsInput.prototype.lookupEnsName = function () { EnsInput.prototype.componentDidUpdate = function (prevProps, prevState) { const state = this.state || {} - const { ensResolution } = state + const ensResolution = state.ensResolution + const nickname = state.nickname || ' ' if (ensResolution && this.props.onChange && ensResolution !== prevState.ensResolution) { - this.props.onChange(ensResolution) + this.props.onChange(ensResolution, nickname) } } |