1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-27 21:00:13 +01:00

Connect to redux for retryTransaction

This commit is contained in:
Alexander Tseung 2017-12-06 22:48:26 -05:00
parent 500fbe450a
commit 02736d2d36

View File

@ -1,6 +1,7 @@
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const connect = require('react-redux').connect
const EthBalance = require('./eth-balance')
const addressSummary = require('../util').addressSummary
@ -13,7 +14,14 @@ const actions = require('../actions')
const TransactionIcon = require('./transaction-list-item-icon')
const ShiftListItem = require('./shift-list-item')
module.exports = TransactionListItem
const mapDispatchToProps = dispatch => {
return {
retryTransaction: transactionId => dispatch(actions.retryTransaction(transactionId)),
}
}
module.exports = connect(null, mapDispatchToProps)(TransactionListItem)
inherits(TransactionListItem, Component)
function TransactionListItem () {
@ -141,7 +149,7 @@ TransactionListItem.prototype.render = function () {
TransactionListItem.prototype.resubmit = function () {
const { transaction } = this.props
this.props.dispatch(actions.resubmitTx(transaction.id))
this.props.retryTransaction(transaction.id)
}
function domainField (txParams) {