diff options
author | anticlimactic <9568756+anticlimactic@users.noreply.github.com> | 2018-03-19 23:11:24 +0800 |
---|---|---|
committer | Dan J Miller <danjm.com@gmail.com> | 2018-03-19 23:11:24 +0800 |
commit | a1db40047c2a6fdbb8d2de2abacd0484e12e128d (patch) | |
tree | e195e3331bbff14f9f2e7cd669a9124f2d57d21c /ui/app/account-detail.js | |
parent | 9b38a77f460a5ada0948182b97419119a495d476 (diff) | |
download | tangerine-wallet-browser-a1db40047c2a6fdbb8d2de2abacd0484e12e128d.tar tangerine-wallet-browser-a1db40047c2a6fdbb8d2de2abacd0484e12e128d.tar.gz tangerine-wallet-browser-a1db40047c2a6fdbb8d2de2abacd0484e12e128d.tar.bz2 tangerine-wallet-browser-a1db40047c2a6fdbb8d2de2abacd0484e12e128d.tar.lz tangerine-wallet-browser-a1db40047c2a6fdbb8d2de2abacd0484e12e128d.tar.xz tangerine-wallet-browser-a1db40047c2a6fdbb8d2de2abacd0484e12e128d.tar.zst tangerine-wallet-browser-a1db40047c2a6fdbb8d2de2abacd0484e12e128d.zip |
Remove unused files from ui folder. (#3577)
* Removed unused UI files. Fixes #3434.
* Reverted the deletion of "feature-toggle-utils.js". Reverted the deletion of the test files and modified the paths so they referred to the old-ui.
Diffstat (limited to 'ui/app/account-detail.js')
-rw-r--r-- | ui/app/account-detail.js | 117 |
1 files changed, 0 insertions, 117 deletions
diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js deleted file mode 100644 index 0da435298..000000000 --- a/ui/app/account-detail.js +++ /dev/null @@ -1,117 +0,0 @@ -const inherits = require('util').inherits -const extend = require('xtend') -const Component = require('react').Component -const h = require('react-hyperscript') -const connect = require('react-redux').connect -const actions = require('./actions') -const valuesFor = require('./util').valuesFor -const TransactionList = require('./components/transaction-list') -const ExportAccountView = require('./components/account-export') -const TabBar = require('./components/tab-bar') -const TokenList = require('./components/token-list') - -module.exports = connect(mapStateToProps)(AccountDetailScreen) - -function mapStateToProps (state) { - return { - metamask: state.metamask, - identities: state.metamask.identities, - accounts: state.metamask.accounts, - address: state.metamask.selectedAddress, - accountDetail: state.appState.accountDetail, - network: state.metamask.network, - unapprovedMsgs: valuesFor(state.metamask.unapprovedMsgs), - shapeShiftTxList: state.metamask.shapeShiftTxList, - transactions: state.metamask.selectedAddressTxList || [], - conversionRate: state.metamask.conversionRate, - currentCurrency: state.metamask.currentCurrency, - currentAccountTab: state.metamask.currentAccountTab, - tokens: state.metamask.tokens, - computedBalances: state.metamask.computedBalances, - } -} - -inherits(AccountDetailScreen, Component) -function AccountDetailScreen () { - Component.call(this) -} - -// Note: This component is no longer used. Leaving the file for reference: -// - structuring routing for add token -// - state required for TxList -// Delete file when those features are complete -AccountDetailScreen.prototype.render = function () {} - -AccountDetailScreen.prototype.subview = function () { - var subview - try { - subview = this.props.accountDetail.subview - } catch (e) { - subview = null - } - - switch (subview) { - case 'transactions': - return this.tabSections() - case 'export': - var state = extend({key: 'export'}, this.props) - return h(ExportAccountView, state) - default: - return this.tabSections() - } -} - -AccountDetailScreen.prototype.tabSections = function () { - const { currentAccountTab } = this.props - - return h('section.tabSection.full-flex-height.grow-tenx', [ - - h(TabBar, { - tabs: [ - { content: 'Sent', key: 'history' }, - { content: 'Tokens', key: 'tokens' }, - ], - defaultTab: currentAccountTab || 'history', - tabSelected: (key) => { - this.props.dispatch(actions.setCurrentAccountTab(key)) - }, - }), - - this.tabSwitchView(), - ]) -} - -AccountDetailScreen.prototype.tabSwitchView = function () { - const props = this.props - const { address, network } = props - const { currentAccountTab, tokens } = this.props - - switch (currentAccountTab) { - case 'tokens': - return h(TokenList, { - userAddress: address, - network, - tokens, - addToken: () => this.props.dispatch(actions.showAddTokenPage()), - }) - default: - return this.transactionList() - } -} - -AccountDetailScreen.prototype.transactionList = function () { - const {transactions, unapprovedMsgs, address, - network, shapeShiftTxList, conversionRate } = this.props - - return h(TransactionList, { - transactions: transactions.sort((a, b) => b.time - a.time), - network, - unapprovedMsgs, - conversionRate, - address, - shapeShiftTxList, - viewPendingTx: (txId) => { - this.props.dispatch(actions.viewPendingTx(txId)) - }, - }) -} |