|
|
@ -3,7 +3,7 @@ import { withRouter } from 'react-router-dom' |
|
|
|
import { compose } from 'recompose' |
|
|
|
import { compose } from 'recompose' |
|
|
|
import withMethodData from '../../higher-order-components/with-method-data' |
|
|
|
import withMethodData from '../../higher-order-components/with-method-data' |
|
|
|
import TransactionListItem from './transaction-list-item.component' |
|
|
|
import TransactionListItem from './transaction-list-item.component' |
|
|
|
import { setSelectedToken, showModal, showSidebar } from '../../actions' |
|
|
|
import { setSelectedToken, showModal, showSidebar, addKnownMethodData } from '../../actions' |
|
|
|
import { hexToDecimal } from '../../helpers/conversions.util' |
|
|
|
import { hexToDecimal } from '../../helpers/conversions.util' |
|
|
|
import { getTokenData } from '../../helpers/transactions.util' |
|
|
|
import { getTokenData } from '../../helpers/transactions.util' |
|
|
|
import { increaseLastGasPrice } from '../../helpers/confirm-transaction/util' |
|
|
|
import { increaseLastGasPrice } from '../../helpers/confirm-transaction/util' |
|
|
@ -15,11 +15,19 @@ import { |
|
|
|
setCustomGasLimit, |
|
|
|
setCustomGasLimit, |
|
|
|
} from '../../ducks/gas.duck' |
|
|
|
} from '../../ducks/gas.duck' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const mapStateToProps = state => { |
|
|
|
|
|
|
|
const { metamask: { knownMethodData } } = state |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
knownMethodData, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => { |
|
|
|
const mapDispatchToProps = dispatch => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
fetchBasicGasAndTimeEstimates: () => dispatch(fetchBasicGasAndTimeEstimates()), |
|
|
|
fetchBasicGasAndTimeEstimates: () => dispatch(fetchBasicGasAndTimeEstimates()), |
|
|
|
fetchGasEstimates: (blockTime) => dispatch(fetchGasEstimates(blockTime)), |
|
|
|
fetchGasEstimates: (blockTime) => dispatch(fetchGasEstimates(blockTime)), |
|
|
|
setSelectedToken: tokenAddress => dispatch(setSelectedToken(tokenAddress)), |
|
|
|
setSelectedToken: tokenAddress => dispatch(setSelectedToken(tokenAddress)), |
|
|
|
|
|
|
|
addKnownMethodData: (fourBytePrefix, methodData) => dispatch(addKnownMethodData(fourBytePrefix, methodData)), |
|
|
|
retryTransaction: (transaction, gasPrice) => { |
|
|
|
retryTransaction: (transaction, gasPrice) => { |
|
|
|
dispatch(setCustomGasPriceForRetry(gasPrice || transaction.txParams.gasPrice)) |
|
|
|
dispatch(setCustomGasPriceForRetry(gasPrice || transaction.txParams.gasPrice)) |
|
|
|
dispatch(setCustomGasLimit(transaction.txParams.gas)) |
|
|
|
dispatch(setCustomGasLimit(transaction.txParams.gas)) |
|
|
@ -64,6 +72,6 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { |
|
|
|
|
|
|
|
|
|
|
|
export default compose( |
|
|
|
export default compose( |
|
|
|
withRouter, |
|
|
|
withRouter, |
|
|
|
connect(null, mapDispatchToProps, mergeProps), |
|
|
|
connect(mapStateToProps, mapDispatchToProps, mergeProps), |
|
|
|
withMethodData, |
|
|
|
withMethodData, |
|
|
|
)(TransactionListItem) |
|
|
|
)(TransactionListItem) |
|
|
|