diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-08-23 05:36:21 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-08-23 05:36:21 +0800 |
commit | f57cbe59fc9e0d3cfb3ee54da749470248fe2b8b (patch) | |
tree | e7d702905f2c92cb987148de8247ead5ead31a00 /ui/app/components/transaction-list.js | |
parent | c223ba2e00ff80913c5b1fe3a339167d4489ec6a (diff) | |
download | tangerine-wallet-browser-f57cbe59fc9e0d3cfb3ee54da749470248fe2b8b.tar.gz tangerine-wallet-browser-f57cbe59fc9e0d3cfb3ee54da749470248fe2b8b.tar.zst tangerine-wallet-browser-f57cbe59fc9e0d3cfb3ee54da749470248fe2b8b.zip |
Removed view more button, added account info button.
Also:
- Also fixed bug that caused React warning when rendering the tx history.
- Renamed 'Transactions' to 'History', since it now has more than that.
Diffstat (limited to 'ui/app/components/transaction-list.js')
-rw-r--r-- | ui/app/components/transaction-list.js | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/ui/app/components/transaction-list.js b/ui/app/components/transaction-list.js index 9348b9fc4..8b9004e69 100644 --- a/ui/app/components/transaction-list.js +++ b/ui/app/components/transaction-list.js @@ -16,7 +16,6 @@ function TransactionList () { TransactionList.prototype.render = function () { const { txsToRender, network, unconfMsgs, address } = this.props - const transactions = txsToRender.concat(unconfMsgs) var shapeShiftTxList if (network === '1'){ shapeShiftTxList = this.props.shapeShiftTxList @@ -47,7 +46,7 @@ TransactionList.prototype.render = function () { paddingBottom: '4px', }, }, [ - 'Transactions', + 'History', ]), h('.tx-list', { @@ -61,13 +60,22 @@ TransactionList.prototype.render = function () { transactions.length ? transactions.map((transaction, i) => { + let key + switch (transaction.key) { + case 'shapeshift': + const { depositAddress, time } = transaction + key = `shift-tx-${depositAddress}-${time}-${i}` + break + default: + key = `tx-${transaction.id}-${i}` + } return h(TransactionListItem, { - transaction, i, network, + transaction, i, network, key, showTx: (txId) => { this.props.viewPendingTx(txId) }, }) - }).concat(viewMoreButton(accountLink)) + }) : h('.flex-center', { style: { flexDirection: 'column', @@ -75,21 +83,9 @@ TransactionList.prototype.render = function () { }, }, [ 'No transaction history.', - viewMoreButton(accountLink), ]), ]), ]) ) } -function viewMoreButton(url) { - return url ? h('button', { - style: { - margin: '10px', - }, - onClick: (ev) => { - ev.preventDefault() - extension.tabs.create({ url }) - }, - }, 'Show More') : null -} |