diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-05 16:48:52 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-06 15:36:31 +0800 |
commit | 06b2a04a4259a0bc7dff4004328441d353c296de (patch) | |
tree | 3ecb23718c23f244f3216b8f82dc3dc0c7e9e014 /ui/app/components/wallet-view.js | |
parent | 562d2fadaed93946bce8e5f306d1a2e271e971c7 (diff) | |
download | tangerine-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.js | 22 |
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(), + ]) } |