diff options
author | Dan <danjm.com@gmail.com> | 2017-09-05 22:27:28 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-06 04:00:50 +0800 |
commit | 562d2fadaed93946bce8e5f306d1a2e271e971c7 (patch) | |
tree | 5671dfd90ddb0a971579609d8412a2b6991f1707 /ui/app | |
parent | 78f39bcce646655bbf549de4778c26ee9f158e92 (diff) | |
download | tangerine-wallet-browser-562d2fadaed93946bce8e5f306d1a2e271e971c7.tar tangerine-wallet-browser-562d2fadaed93946bce8e5f306d1a2e271e971c7.tar.gz tangerine-wallet-browser-562d2fadaed93946bce8e5f306d1a2e271e971c7.tar.bz2 tangerine-wallet-browser-562d2fadaed93946bce8e5f306d1a2e271e971c7.tar.lz tangerine-wallet-browser-562d2fadaed93946bce8e5f306d1a2e271e971c7.tar.xz tangerine-wallet-browser-562d2fadaed93946bce8e5f306d1a2e271e971c7.tar.zst tangerine-wallet-browser-562d2fadaed93946bce8e5f306d1a2e271e971c7.zip |
Use .entries() instead of .keys(), and use more destructuring, for simpler code.
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/send.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/ui/app/send.js b/ui/app/send.js index de11e0149..c15409b31 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -193,20 +193,19 @@ SendTransactionScreen.prototype.render = function () { h('datalist#addresses', {}, [ // Corresponds to the addresses owned. - Object.keys(props.identities).map((key) => { - const identity = props.identities[key] + Object.entries(props.identities).map(([key, { address, name }]) => { return h('option', { - value: identity.address, - label: identity.name, - key: identity.address, + value: address, + label: name, + key: address, }) }), // Corresponds to previously sent-to addresses. - props.addressBook.map((identity) => { + props.addressBook.map(({ address, name }) => { return h('option', { - value: identity.address, - label: identity.name, - key: identity.address, + value: address, + label: name, + key: address, }) }), ]), |