diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-08-30 07:14:51 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-08-30 07:14:51 +0800 |
commit | e85418b11ad14bf6f0cc3fdbcdbb5669330c4778 (patch) | |
tree | df71d73fa1533cea8b36fb24db90e02a07766607 /ui/app/components/transaction-list.js | |
parent | 40d5b446cfbea436a012d1799d0d7710caca752c (diff) | |
parent | a9c738d4d3226f61942641a41c399c75a3e9eb3e (diff) | |
download | tangerine-wallet-browser-e85418b11ad14bf6f0cc3fdbcdbb5669330c4778.tar.gz tangerine-wallet-browser-e85418b11ad14bf6f0cc3fdbcdbb5669330c4778.tar.zst tangerine-wallet-browser-e85418b11ad14bf6f0cc3fdbcdbb5669330c4778.zip |
Merge branch 'master' into EdgeCompatibility
Diffstat (limited to 'ui/app/components/transaction-list.js')
-rw-r--r-- | ui/app/components/transaction-list.js | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/ui/app/components/transaction-list.js b/ui/app/components/transaction-list.js index 886aa7c00..7e1bedb05 100644 --- a/ui/app/components/transaction-list.js +++ b/ui/app/components/transaction-list.js @@ -14,7 +14,11 @@ function TransactionList () { TransactionList.prototype.render = function () { const { txsToRender, network, unconfMsgs } = this.props - const transactions = txsToRender.concat(unconfMsgs) + var shapeShiftTxList + if (network === '1') { + shapeShiftTxList = this.props.shapeShiftTxList + } + const transactions = !shapeShiftTxList ? txsToRender.concat(unconfMsgs) : txsToRender.concat(unconfMsgs, shapeShiftTxList) .sort((a, b) => b.time - a.time) return ( @@ -39,33 +43,46 @@ TransactionList.prototype.render = function () { paddingBottom: '4px', }, }, [ - 'Transactions', + 'History', ]), h('.tx-list', { style: { overflowY: 'auto', - height: '305px', + height: '300px', padding: '0 20px', textAlign: 'center', }, - }, ( + }, [ 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) }, }) }) - : [h('.flex-center', { + : h('.flex-center', { style: { + flexDirection: 'column', height: '100%', }, - }, 'No transaction history...')] - )), + }, [ + 'No transaction history.', + ]), + ]), ]) ) } + |