diff options
author | kumavis <kumavis@users.noreply.github.com> | 2016-08-23 10:22:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-23 10:22:31 +0800 |
commit | 07927b57986ffb0035b6b30ae7e54b843b551d83 (patch) | |
tree | 5e11c75a4b1fdbb6d2d351c4ab9f1f50c8b45cb1 /ui/app/components/transaction-list.js | |
parent | f9c58c07466d181a895cd38b1c3049a11e02cb99 (diff) | |
parent | 5c9ca21ba3224fd54430a3c518b825ff6cd112f3 (diff) | |
download | tangerine-wallet-browser-07927b57986ffb0035b6b30ae7e54b843b551d83.tar.gz tangerine-wallet-browser-07927b57986ffb0035b6b30ae7e54b843b551d83.tar.zst tangerine-wallet-browser-07927b57986ffb0035b6b30ae7e54b843b551d83.zip |
Merge pull request #558 from MetaMask/i390-TransactionLimit
Enforce transaction log limit
Diffstat (limited to 'ui/app/components/transaction-list.js')
-rw-r--r-- | ui/app/components/transaction-list.js | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/ui/app/components/transaction-list.js b/ui/app/components/transaction-list.js index 9bf0f6d81..7e1bedb05 100644 --- a/ui/app/components/transaction-list.js +++ b/ui/app/components/transaction-list.js @@ -15,7 +15,7 @@ function TransactionList () { TransactionList.prototype.render = function () { const { txsToRender, network, unconfMsgs } = this.props var shapeShiftTxList - if (network === '1'){ + if (network === '1') { shapeShiftTxList = this.props.shapeShiftTxList } const transactions = !shapeShiftTxList ? txsToRender.concat(unconfMsgs) : txsToRender.concat(unconfMsgs, shapeShiftTxList) @@ -43,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.', + ]), + ]), ]) ) } + |