From 1ca6fff31719c4ff8d155dc9f7c88663a6719046 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Thu, 9 Mar 2017 11:31:00 -0800 Subject: Display owned addresses in datalist. --- ui/app/components/ens-input.js | 10 ++++++++++ ui/app/send.js | 2 ++ 2 files changed, 12 insertions(+) (limited to 'ui') diff --git a/ui/app/components/ens-input.js b/ui/app/components/ens-input.js index ffc4eab4a..80c8deb22 100644 --- a/ui/app/components/ens-input.js +++ b/ui/app/components/ens-input.js @@ -21,6 +21,7 @@ function EnsInput () { EnsInput.prototype.render = function () { const props = this.props const opts = extend(props, { + list: 'addresses', onChange: () => { const network = this.props.network let resolverAddress = networkResolvers[network] @@ -46,6 +47,15 @@ EnsInput.prototype.render = function () { style: { width: '100%' }, }, [ h('input.large-input', opts), + h('datalist', + { + id: 'addresses', + }, + [ + Object.keys(props.identities).map((key) => { + return h('option', props.identities[key].address) + }), + ]), this.ensIcon(), ]) } diff --git a/ui/app/send.js b/ui/app/send.js index a281a5fcf..a2ce696cf 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -44,6 +44,7 @@ SendTransactionScreen.prototype.render = function () { var account = state.account var identity = state.identity var network = state.network + var identities = state.identities return ( @@ -153,6 +154,7 @@ SendTransactionScreen.prototype.render = function () { placeholder: 'Recipient Address', onChange: this.recipientDidChange.bind(this), network, + identities, }), ]), -- cgit