aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/account-detail.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-04-22 00:01:51 +0800
committerDan Finlay <dan@danfinlay.com>2017-04-22 00:01:51 +0800
commit40e2450022488daa5e36d4c1b866e061bba7c5d2 (patch)
tree7cb0e9d3a1d3f5a9654f8a4c5358987d567d9ea9 /ui/app/account-detail.js
parent7202639b370279f90886f2e94ab77aba5b205bc3 (diff)
downloadtangerine-wallet-browser-40e2450022488daa5e36d4c1b866e061bba7c5d2.tar.gz
tangerine-wallet-browser-40e2450022488daa5e36d4c1b866e061bba7c5d2.tar.zst
tangerine-wallet-browser-40e2450022488daa5e36d4c1b866e061bba7c5d2.zip
Get token list looking ok
Diffstat (limited to 'ui/app/account-detail.js')
-rw-r--r--ui/app/account-detail.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js
index 411f38e5e..5ceee4fe0 100644
--- a/ui/app/account-detail.js
+++ b/ui/app/account-detail.js
@@ -249,6 +249,12 @@ AccountDetailScreen.prototype.subview = function () {
}
AccountDetailScreen.prototype.tabSections = function () {
+ var subview
+ try {
+ subview = this.props.accountDetail.subview
+ } catch (e) {
+ subview = null
+ }
return h('section.tabSection', [
@@ -257,7 +263,7 @@ AccountDetailScreen.prototype.tabSections = function () {
{ content: 'History', key: 'history' },
{ content: 'Tokens', key: 'tokens' },
],
- defaultTab: 'history',
+ defaultTab: subview || 'history',
tabSelected: (key) => {
this.setState({ tabSelection: key })
},
@@ -268,8 +274,16 @@ AccountDetailScreen.prototype.tabSections = function () {
}
AccountDetailScreen.prototype.tabSwitchView = function () {
- const tabSelection = this.state.tabSelection || 'history'
const userAddress = this.props.address
+ var subview
+ try {
+ subview = this.props.accountDetail.subview
+ return h(TokenList, { userAddress })
+ } catch (e) {
+ subview = null
+ }
+
+ const tabSelection = this.state.tabSelection || 'history'
switch (tabSelection) {
case 'tokens':