mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix cursor on unclickable transactions (#2356)
This commit is contained in:
parent
b149cceda0
commit
3fd9c8b57f
@ -8,6 +8,7 @@ const TxListItem = require('./tx-list-item')
|
|||||||
const ShiftListItem = require('./shift-list-item')
|
const ShiftListItem = require('./shift-list-item')
|
||||||
const { formatBalance, formatDate } = require('../util')
|
const { formatBalance, formatDate } = require('../util')
|
||||||
const { showConfTxPage } = require('../actions')
|
const { showConfTxPage } = require('../actions')
|
||||||
|
const classnames = require('classnames')
|
||||||
|
|
||||||
module.exports = connect(mapStateToProps, mapDispatchToProps)(TxList)
|
module.exports = connect(mapStateToProps, mapDispatchToProps)(TxList)
|
||||||
|
|
||||||
@ -97,18 +98,23 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa
|
|||||||
address,
|
address,
|
||||||
transactionAmount,
|
transactionAmount,
|
||||||
transactionHash,
|
transactionHash,
|
||||||
className: '.tx-list-item.tx-list-clickable',
|
|
||||||
conversionRate,
|
conversionRate,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transactionStatus === 'unapproved') {
|
const isUnapproved = transactionStatus === 'unapproved';
|
||||||
|
|
||||||
|
if (isUnapproved) {
|
||||||
opts.onClick = () => showConfTxPage({id: transActionId})
|
opts.onClick = () => showConfTxPage({id: transActionId})
|
||||||
opts.className += '.tx-list-pending-item-container'
|
|
||||||
opts.transactionStatus = 'Not Started'
|
opts.transactionStatus = 'Not Started'
|
||||||
} else if (transactionHash) {
|
} else if (transactionHash) {
|
||||||
opts.onClick = () => this.view(transactionHash, transactionNetworkId)
|
opts.onClick = () => this.view(transactionHash, transactionNetworkId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opts.className = classnames('.tx-list-item', {
|
||||||
|
'.tx-list-pending-item-container': isUnapproved,
|
||||||
|
'.tx-list-clickable': Boolean(transactionHash) || isUnapproved,
|
||||||
|
})
|
||||||
|
|
||||||
return h(TxListItem, opts)
|
return h(TxListItem, opts)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user