diff options
author | Frankie <frankie.pangilinan@consensys.net> | 2016-06-22 06:04:00 +0800 |
---|---|---|
committer | Frankie <frankie.pangilinan@consensys.net> | 2016-06-22 06:04:00 +0800 |
commit | cf663f1104697440121d32cc6db2a8a1d5d54c5a (patch) | |
tree | 3ed4b8b9fe8c85f3b3a5bf68482c3fb9967f2de5 /ui/app/accounts | |
parent | 265725c6edd62a7f46a9b9cf5a443cf01f0ff00c (diff) | |
parent | dc2ef967028723afe9fe1efd669754723e38a4f0 (diff) | |
download | tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.gz tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.bz2 tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.lz tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.xz tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.tar.zst tangerine-wallet-browser-cf663f1104697440121d32cc6db2a8a1d5d54c5a.zip |
Fix conflict
Diffstat (limited to 'ui/app/accounts')
-rw-r--r-- | ui/app/accounts/account-panel.js | 14 | ||||
-rw-r--r-- | ui/app/accounts/index.js | 101 |
2 files changed, 56 insertions, 59 deletions
diff --git a/ui/app/accounts/account-panel.js b/ui/app/accounts/account-panel.js index ddccfa529..1c9e84414 100644 --- a/ui/app/accounts/account-panel.js +++ b/ui/app/accounts/account-panel.js @@ -9,18 +9,15 @@ const Identicon = require('../components/identicon') module.exports = NewComponent - inherits(NewComponent, Component) -function NewComponent() { +function NewComponent () { Component.call(this) } -NewComponent.prototype.render = function() { +NewComponent.prototype.render = function () { const identity = this.props.identity - var mayBeFauceting = identity.mayBeFauceting var isSelected = this.props.selectedAddress === identity.address var account = this.props.accounts[identity.address] - var isFauceting = mayBeFauceting && account.balance === '0x0' const selectedClass = isSelected ? '.selected' : '' return ( @@ -35,7 +32,7 @@ NewComponent.prototype.render = function() { h('.identicon-wrapper.flex-column.flex-center.select-none', [ this.pendingOrNot(), h(Identicon, { - address: identity.address + address: identity.address, }), ]), @@ -70,16 +67,19 @@ NewComponent.prototype.render = function() { event.preventDefault() copyToClipboard(ethUtil.toChecksumAddress(identity.address)) }, +<<<<<<< HEAD style:{ margin: '0px 5px', }, +======= +>>>>>>> master }), ]), ]) ) } -NewComponent.prototype.pendingOrNot = function() { +NewComponent.prototype.pendingOrNot = function () { const pending = this.props.pending if (pending.length === 0) return null return h('.pending-dot', pending.length) diff --git a/ui/app/accounts/index.js b/ui/app/accounts/index.js index 8215a559a..775df400b 100644 --- a/ui/app/accounts/index.js +++ b/ui/app/accounts/index.js @@ -2,7 +2,6 @@ const inherits = require('util').inherits const Component = require('react').Component const h = require('react-hyperscript') const connect = require('react-redux').connect -const extend = require('xtend') const actions = require('../actions') const valuesFor = require('../util').valuesFor const findDOMNode = require('react-dom').findDOMNode @@ -10,8 +9,7 @@ const AccountPanel = require('./account-panel') module.exports = connect(mapStateToProps)(AccountsScreen) - -function mapStateToProps(state) { +function mapStateToProps (state) { const pendingTxs = valuesFor(state.metamask.unconfTxs) const pendingMsgs = valuesFor(state.metamask.unconfMsgs) const pending = pendingTxs.concat(pendingMsgs) @@ -28,12 +26,11 @@ function mapStateToProps(state) { } inherits(AccountsScreen, Component) -function AccountsScreen() { +function AccountsScreen () { Component.call(this) } - -AccountsScreen.prototype.render = function() { +AccountsScreen.prototype.render = function () { var state = this.props var identityList = valuesFor(state.identities) var unconfTxList = valuesFor(state.unconfTxs) @@ -63,48 +60,48 @@ AccountsScreen.prototype.render = function() { height: '418px', overflowY: 'auto', overflowX: 'hidden', - } + }, }, - [ - identityList.map((identity) => { - const pending = this.props.pending.filter((txOrMsg) => { - if ('txParams' in txOrMsg) { - return txOrMsg.txParams.from === identity.address - } else if ('msgParams' in txOrMsg) { - return txOrMsg.msgParams.from === identity.address - } else { - return false - } - }) - - return h(AccountPanel, { - key: `acct-panel-${identity.address}`, - identity, - selectedAddress: this.props.selectedAddress, - accounts: this.props.accounts, - onShowDetail: this.onShowDetail.bind(this), - pending, - }) - }), - - h('hr.horizontal-line', {key: 'horizontal-line1'}), - h('div.footer.hover-white.pointer', { - key: 'reveal-account-bar', - onClick:() => { - actions.revealAccount() - }, - style: { - display: 'flex', - flex: '1 0 auto', - height: '40px', - paddint: '10px', - justifyContent: 'center', - alignItems: 'center', - } - }, [ - h('i.fa.fa-plus.fa-lg', {key: ''}), + [ + identityList.map((identity) => { + const pending = this.props.pending.filter((txOrMsg) => { + if ('txParams' in txOrMsg) { + return txOrMsg.txParams.from === identity.address + } else if ('msgParams' in txOrMsg) { + return txOrMsg.msgParams.from === identity.address + } else { + return false + } + }) + + return h(AccountPanel, { + key: `acct-panel-${identity.address}`, + identity, + selectedAddress: this.props.selectedAddress, + accounts: this.props.accounts, + onShowDetail: this.onShowDetail.bind(this), + pending, + }) + }), + + h('hr.horizontal-line', {key: 'horizontal-line1'}), + h('div.footer.hover-white.pointer', { + key: 'reveal-account-bar', + onClick: () => { + actions.revealAccount() + }, + style: { + display: 'flex', + flex: '1 0 auto', + height: '40px', + paddint: '10px', + justifyContent: 'center', + alignItems: 'center', + }, + }, [ + h('i.fa.fa-plus.fa-lg', {key: ''}), + ]), ]), - ]), unconfTxList.length ? ( @@ -123,7 +120,7 @@ AccountsScreen.prototype.render = function() { } // If a new account was revealed, scroll to the bottom -AccountsScreen.prototype.componentDidUpdate = function(){ +AccountsScreen.prototype.componentDidUpdate = function () { const scrollToBottom = this.props.scrollToBottom if (scrollToBottom) { @@ -133,27 +130,27 @@ AccountsScreen.prototype.componentDidUpdate = function(){ } } -AccountsScreen.prototype.navigateToConfTx = function(){ +AccountsScreen.prototype.navigateToConfTx = function () { event.stopPropagation() this.props.dispatch(actions.showConfTxPage()) } -AccountsScreen.prototype.onSelect = function(address, event){ +AccountsScreen.prototype.onSelect = function (address, event) { event.stopPropagation() // if already selected, deselect if (this.props.selectedAddress === address) address = null this.props.dispatch(actions.setSelectedAddress(address)) } -AccountsScreen.prototype.onShowDetail = function(address, event){ +AccountsScreen.prototype.onShowDetail = function (address, event) { event.stopPropagation() this.props.dispatch(actions.showAccountDetail(address)) } -AccountsScreen.prototype.onRevealAccount = function() { +AccountsScreen.prototype.onRevealAccount = function () { this.props.dispatch(actions.revealAccount()) } -AccountsScreen.prototype.goHome = function() { +AccountsScreen.prototype.goHome = function () { this.props.dispatch(actions.goHome()) } |