diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-08-16 01:50:53 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-08-16 01:50:53 +0800 |
commit | 6895d330ffdf0f071e4df3fb9da47f2ea6fc7491 (patch) | |
tree | 64e170d2bd39434674e0c92bb637fd1d2c57debc /ui/app/account-detail.js | |
parent | cb0c1f25bacab5f6ee9348dbc3dc112f4d77560f (diff) | |
parent | 271e3c4fdf1a86a989d642c18815d7f6537ed951 (diff) | |
download | tangerine-wallet-browser-6895d330ffdf0f071e4df3fb9da47f2ea6fc7491.tar tangerine-wallet-browser-6895d330ffdf0f071e4df3fb9da47f2ea6fc7491.tar.gz tangerine-wallet-browser-6895d330ffdf0f071e4df3fb9da47f2ea6fc7491.tar.bz2 tangerine-wallet-browser-6895d330ffdf0f071e4df3fb9da47f2ea6fc7491.tar.lz tangerine-wallet-browser-6895d330ffdf0f071e4df3fb9da47f2ea6fc7491.tar.xz tangerine-wallet-browser-6895d330ffdf0f071e4df3fb9da47f2ea6fc7491.tar.zst tangerine-wallet-browser-6895d330ffdf0f071e4df3fb9da47f2ea6fc7491.zip |
Merge master.
Diffstat (limited to 'ui/app/account-detail.js')
-rw-r--r-- | ui/app/account-detail.js | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js index 3cc1fb8ba..7af8aece7 100644 --- a/ui/app/account-detail.js +++ b/ui/app/account-detail.js @@ -15,7 +15,7 @@ const ExportAccountView = require('./components/account-export') const ethUtil = require('ethereumjs-util') const EditableLabel = require('./components/editable-label') const Tooltip = require('./components/tooltip') - +const BuyButtonSubview = require('./components/buy-button-subview') module.exports = connect(mapStateToProps)(AccountDetailScreen) function mapStateToProps (state) { @@ -173,14 +173,19 @@ AccountDetailScreen.prototype.render = function () { }), h('button', { - onClick: () => props.dispatch(actions.buyEth(selected)), + onClick: () => props.dispatch(actions.buyEthView(selected)), style: { marginBottom: '20px', marginRight: '8px', position: 'absolute', left: '219px', }, - }, 'BUY'), + }, props.accountDetail.subview === 'buyForm' ? [h('i.fa.fa-arrow-left', { + style: { + width: '22.641px', + height: '14px', + }, + })] : 'BUY'), h('button', { onClick: () => props.dispatch(actions.showSendPage()), @@ -221,6 +226,8 @@ AccountDetailScreen.prototype.subview = function () { case 'export': var state = extend({key: 'export'}, this.props) return h(ExportAccountView, state) + case 'buyForm': + return h(BuyButtonSubview, extend({key: 'buyForm'}, this.props)) default: return this.transactionList() } @@ -251,3 +258,14 @@ AccountDetailScreen.prototype.transactionList = function () { AccountDetailScreen.prototype.requestAccountExport = function () { this.props.dispatch(actions.requestExportAccount()) } + + +AccountDetailScreen.prototype.buyButtonDeligator = function () { + var props = this.props + + if (this.props.accountDetail.subview === 'buyForm') { + props.dispatch(actions.backToAccountDetail(props.address)) + } else { + props.dispatch(actions.buyEthView()) + } +} |