diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-11-08 01:29:47 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-11-08 01:29:47 +0800 |
commit | 08867874ccea02dab9755ba6b0fc4221bb1dbf00 (patch) | |
tree | 5b2b893c4c00a14daa9724ba28ff7dc8f504ea10 /ui/app/components/send/to-autocomplete.js | |
parent | a89b682dec350218b2d753d6cfb196f965acdde2 (diff) | |
parent | acc973d543ac65f8db980c0007c248c509345411 (diff) | |
download | tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.tar tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.tar.gz tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.tar.bz2 tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.tar.lz tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.tar.xz tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.tar.zst tangerine-wallet-browser-08867874ccea02dab9755ba6b0fc4221bb1dbf00.zip |
Merge remote-tracking branch 'origin/uat' into mascara-first-screen
Diffstat (limited to 'ui/app/components/send/to-autocomplete.js')
-rw-r--r-- | ui/app/components/send/to-autocomplete.js | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/ui/app/components/send/to-autocomplete.js b/ui/app/components/send/to-autocomplete.js index ab490155b..df43fcc4a 100644 --- a/ui/app/components/send/to-autocomplete.js +++ b/ui/app/components/send/to-autocomplete.js @@ -1,7 +1,6 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits -const Identicon = require('../identicon') const AccountListItem = require('./account-list-item') module.exports = ToAutoComplete @@ -23,7 +22,6 @@ ToAutoComplete.prototype.getListItemIcon = function (listItemAddress, toAddress) ToAutoComplete.prototype.renderDropdown = function () { const { - accounts, closeDropdown, onChange, to, @@ -39,15 +37,15 @@ ToAutoComplete.prototype.renderDropdown = function () { h('div.send-v2__from-dropdown__list', {}, [ ...accountsToRender.map(account => h(AccountListItem, { - account, + account, handleClick: () => { onChange(account.address) closeDropdown() - }, + }, icon: this.getListItemIcon(account.address, to), displayBalance: false, displayAddress: true, - })) + })), ]), @@ -69,8 +67,7 @@ ToAutoComplete.prototype.handleInputEvent = function (event = {}, cb) { this.setState({ accountsToRender: [] }) event.target && event.target.select() closeDropdown() - } - else { + } else { this.setState({ accountsToRender: matchingAccounts }) openDropdown() } @@ -86,9 +83,6 @@ ToAutoComplete.prototype.componentDidUpdate = function (nextProps, nextState) { ToAutoComplete.prototype.render = function () { const { to, - accounts, - openDropdown, - closeDropdown, dropdownOpen, onChange, inError, @@ -98,13 +92,13 @@ ToAutoComplete.prototype.render = function () { h('input.send-v2__to-autocomplete__input', { placeholder: 'Recipient Address', - className: inError ? `send-v2__error-border` : '', + className: inError ? `send-v2__error-border` : '', value: to, onChange: event => onChange(event.target.value), onFocus: event => this.handleInputEvent(event), style: { borderColor: inError ? 'red' : null, - } + }, }), !to && h(`i.fa.fa-caret-down.fa-lg.send-v2__to-autocomplete__down-caret`, { |