diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-05-27 05:32:45 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-05-27 05:32:45 +0800 |
commit | 5da6fd5ab18812929cbf790527a3029fd8d7123c (patch) | |
tree | a93ca3f0f32e715c9c5174dfe5e205239de59e9d /ui/app/components | |
parent | d31189b2066d0225eb57e86d077d579cf223658c (diff) | |
download | tangerine-wallet-browser-5da6fd5ab18812929cbf790527a3029fd8d7123c.tar.gz tangerine-wallet-browser-5da6fd5ab18812929cbf790527a3029fd8d7123c.tar.zst tangerine-wallet-browser-5da6fd5ab18812929cbf790527a3029fd8d7123c.zip |
Add clicking txs in list shows tx conf screen
Diffstat (limited to 'ui/app/components')
-rw-r--r-- | ui/app/components/transaction-list-item.js | 9 | ||||
-rw-r--r-- | ui/app/components/transaction-list.js | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js index cff9a47b2..ac74046f3 100644 --- a/ui/app/components/transaction-list-item.js +++ b/ui/app/components/transaction-list-item.js @@ -25,6 +25,7 @@ TransactionListItem.prototype.render = function() { var isMsg = ('msgParams' in transaction) var isTx = ('txParams' in transaction) + var isPending = transaction.status === 'unconfirmed' let txParams if (isTx) { @@ -33,10 +34,16 @@ TransactionListItem.prototype.render = function() { txParams = transaction.msgParams } + const isClickable = ('hash' in transaction) || isPending + return ( - h(`.transaction-list-item.flex-row.flex-space-between${transaction.hash ? '.pointer' : ''}`, { + h(`.transaction-list-item.flex-row.flex-space-between${isClickable ? '.pointer' : ''}`, { key: `tx-${transaction.id + i}`, onClick: (event) => { + if (isPending) { + this.props.showTx(transaction.id) + } + if (!transaction.hash) return var url = explorerLink(transaction.hash, parseInt(network)) chrome.tabs.create({ url }) diff --git a/ui/app/components/transaction-list.js b/ui/app/components/transaction-list.js index 3c778b19d..5ebb3e563 100644 --- a/ui/app/components/transaction-list.js +++ b/ui/app/components/transaction-list.js @@ -16,7 +16,6 @@ TransactionList.prototype.render = function() { const { txsToRender, network, unconfTxs, unconfMsgs } = this.props const transactions = txsToRender.concat(unconfMsgs) .sort((a, b) => b.time - a.time) - console.dir(transactions) return ( @@ -53,7 +52,10 @@ TransactionList.prototype.render = function() { transactions.length ? transactions.map((transaction, i) => { return h(TransactionListItem, { - transaction, i + transaction, i, + showTx:(txId) => { + this.props.viewPendingTx(txId) + }, }) }) : |