diff options
Add retry button to TransactionListItem
Diffstat (limited to 'ui/app/components/transaction-list-item/transaction-list-item.container.js')
-rw-r--r-- | ui/app/components/transaction-list-item/transaction-list-item.container.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ui/app/components/transaction-list-item/transaction-list-item.container.js b/ui/app/components/transaction-list-item/transaction-list-item.container.js index bc47f20aa..d6e57028e 100644 --- a/ui/app/components/transaction-list-item/transaction-list-item.container.js +++ b/ui/app/components/transaction-list-item/transaction-list-item.container.js @@ -1,7 +1,9 @@ import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' import { compose } from 'recompose' +import withMethodData from '../../higher-order-components/with-method-data' import TransactionListItem from './transaction-list-item.component' +import { setSelectedToken, retryTransaction } from '../../actions' import { getEthFromWeiHex, getValueFromWeiHex } from '../../helpers/conversions.util' import { formatCurrency } from '../../helpers/confirm-transaction/util' @@ -22,7 +24,15 @@ const mapStateToProps = (state, ownProps) => { } } +const mapDispatchToProps = dispatch => { + return { + setSelectedToken: tokenAddress => dispatch(setSelectedToken(tokenAddress)), + retryTransaction: transactionId => dispatch(retryTransaction(transactionId)), + } +} + export default compose( withRouter, - connect(mapStateToProps), + connect(mapStateToProps, mapDispatchToProps), + withMethodData, )(TransactionListItem) |