aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send/to-autocomplete.js
diff options
context:
space:
mode:
authorThomas Huang <tmashuang@users.noreply.github.com>2017-11-03 01:02:09 +0800
committerGitHub <noreply@github.com>2017-11-03 01:02:09 +0800
commit86e88dc8135e9729a86c4b8ce3c00a9d4cad0a3e (patch)
tree1da4b27d85cb0e155c7709d7b3a73d75645726a5 /ui/app/components/send/to-autocomplete.js
parentc1d2a1226c5ba4e5cfe1eeae2f52a86b67fc7404 (diff)
parent56e9f98bd05de8ae26f653d15eec4304f0c72155 (diff)
downloadtangerine-wallet-browser-86e88dc8135e9729a86c4b8ce3c00a9d4cad0a3e.tar.gz
tangerine-wallet-browser-86e88dc8135e9729a86c4b8ce3c00a9d4cad0a3e.tar.zst
tangerine-wallet-browser-86e88dc8135e9729a86c4b8ce3c00a9d4cad0a3e.zip
Merge pull request #2519 from danjm/NewUI-flat-lintfixes
[NewUI-flat] New ui flat lintfixes
Diffstat (limited to 'ui/app/components/send/to-autocomplete.js')
-rw-r--r--ui/app/components/send/to-autocomplete.js18
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`, {