aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/wallet-view.js
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2017-09-05 16:48:52 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-09-06 15:36:31 +0800
commit06b2a04a4259a0bc7dff4004328441d353c296de (patch)
tree3ecb23718c23f244f3216b8f82dc3dc0c7e9e014 /ui/app/components/wallet-view.js
parent562d2fadaed93946bce8e5f306d1a2e271e971c7 (diff)
downloadtangerine-wallet-browser-06b2a04a4259a0bc7dff4004328441d353c296de.tar
tangerine-wallet-browser-06b2a04a4259a0bc7dff4004328441d353c296de.tar.gz
tangerine-wallet-browser-06b2a04a4259a0bc7dff4004328441d353c296de.tar.bz2
tangerine-wallet-browser-06b2a04a4259a0bc7dff4004328441d353c296de.tar.lz
tangerine-wallet-browser-06b2a04a4259a0bc7dff4004328441d353c296de.tar.xz
tangerine-wallet-browser-06b2a04a4259a0bc7dff4004328441d353c296de.tar.zst
tangerine-wallet-browser-06b2a04a4259a0bc7dff4004328441d353c296de.zip
Implement tokens list UI
Diffstat (limited to 'ui/app/components/wallet-view.js')
-rw-r--r--ui/app/components/wallet-view.js22
1 files changed, 21 insertions, 1 deletions
diff --git a/ui/app/components/wallet-view.js b/ui/app/components/wallet-view.js
index 48971a29e..304b5daba 100644
--- a/ui/app/components/wallet-view.js
+++ b/ui/app/components/wallet-view.js
@@ -6,6 +6,7 @@ const Identicon = require('./identicon')
const AccountDropdowns = require('./dropdowns/index.js').AccountDropdowns
const actions = require('../actions')
const BalanceComponent = require('./balance-component')
+const TokenList = require('./token-list')
const selectors = require('../selectors')
module.exports = connect(mapStateToProps, mapDispatchToProps)(WalletView)
@@ -17,6 +18,7 @@ function mapStateToProps (state) {
sidebarOpen: state.appState.sidebarOpen,
identities: state.metamask.identities,
accounts: state.metamask.accounts,
+ tokens: state.metamask.tokens,
selectedAddress: selectors.getSelectedAddress(state),
selectedIdentity: selectors.getSelectedIdentity(state),
selectedAccount: selectors.getSelectedAccount(state),
@@ -35,8 +37,23 @@ function WalletView () {
Component.call(this)
}
+WalletView.prototype.renderTokenBalances = function () {
+ // const { tokens = [] } = this.props
+ // return tokens.map(({ address, decimals, symbol }) => (
+ // h(BalanceComponent, {
+ // balanceValue: 0,
+ // style: {},
+ // })
+ // ))
+ return h(TokenList)
+}
+
WalletView.prototype.render = function () {
- const { network, responsiveDisplayClassname, identities, selectedAddress, selectedAccount, accounts, selectedIdentity } = this.props
+ const {
+ network, responsiveDisplayClassname, identities,
+ selectedAddress, selectedAccount, accounts,
+ selectedIdentity,
+ } = this.props
// temporary logs + fake extra wallets
console.log('walletview, selectedAccount:', selectedAccount)
@@ -134,8 +151,11 @@ WalletView.prototype.render = function () {
]),
+
]),
+ this.renderTokenBalances(),
+
])
}