aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send/from-dropdown.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-10-13 01:29:03 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-10-18 09:10:09 +0800
commitac43872c1a1468057974648c8ae90bf1edd708d7 (patch)
treedcd98d338d99b97dc91ac7240326e9b4a6a50841 /ui/app/components/send/from-dropdown.js
parent7caa9142235cc0eca20d638a066d666d8cfaabee (diff)
downloadtangerine-wallet-browser-ac43872c1a1468057974648c8ae90bf1edd708d7.tar
tangerine-wallet-browser-ac43872c1a1468057974648c8ae90bf1edd708d7.tar.gz
tangerine-wallet-browser-ac43872c1a1468057974648c8ae90bf1edd708d7.tar.bz2
tangerine-wallet-browser-ac43872c1a1468057974648c8ae90bf1edd708d7.tar.lz
tangerine-wallet-browser-ac43872c1a1468057974648c8ae90bf1edd708d7.tar.xz
tangerine-wallet-browser-ac43872c1a1468057974648c8ae90bf1edd708d7.tar.zst
tangerine-wallet-browser-ac43872c1a1468057974648c8ae90bf1edd708d7.zip
Enable send-v2 functionality.
Diffstat (limited to 'ui/app/components/send/from-dropdown.js')
-rw-r--r--ui/app/components/send/from-dropdown.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/ui/app/components/send/from-dropdown.js b/ui/app/components/send/from-dropdown.js
index e8e1d43f0..fd6fb7e64 100644
--- a/ui/app/components/send/from-dropdown.js
+++ b/ui/app/components/send/from-dropdown.js
@@ -19,7 +19,14 @@ FromDropdown.prototype.getListItemIcon = function (currentAccount, selectedAccou
: null
}
-FromDropdown.prototype.renderDropdown = function (accounts, selectedAccount, closeDropdown) {
+FromDropdown.prototype.renderDropdown = function () {
+ const {
+ accounts,
+ selectedAccount,
+ closeDropdown,
+ onSelect,
+ } = this.props
+
return h('div', {}, [
h('div.send-v2__from-dropdown__close-area', {
@@ -30,7 +37,10 @@ FromDropdown.prototype.renderDropdown = function (accounts, selectedAccount, clo
...accounts.map(account => h(AccountListItem, {
account,
- handleClick: () => console.log('Select identity'),
+ handleClick: () => {
+ onSelect(account.address)
+ closeDropdown()
+ },
icon: this.getListItemIcon(account, selectedAccount),
}))
@@ -43,7 +53,6 @@ FromDropdown.prototype.render = function () {
const {
accounts,
selectedAccount,
- setFromField,
openDropdown,
closeDropdown,
dropdownOpen,
@@ -57,7 +66,7 @@ FromDropdown.prototype.render = function () {
icon: h(`i.fa.fa-caret-down.fa-lg`, { style: { color: '#dedede' } })
}),
- dropdownOpen && this.renderDropdown(accounts, selectedAccount, closeDropdown),
+ dropdownOpen && this.renderDropdown(),
])