diff options
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) + }, }) }) : |