1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Fix undefined tx id error (#7053)

Also delete unused function
This commit is contained in:
Erik Marks 2019-08-26 06:04:48 -06:00 committed by Mark Stacey
parent fe2d053435
commit 2306dbd75e

View File

@ -41,11 +41,6 @@ export default class ConfirmTransaction extends Component {
isTokenMethodAction: PropTypes.bool, isTokenMethodAction: PropTypes.bool,
} }
getParamsTransactionId () {
const { match: { params: { id } = {} } } = this.props
return id || null
}
componentDidMount () { componentDidMount () {
const { const {
totalUnapprovedCount = 0, totalUnapprovedCount = 0,
@ -70,7 +65,8 @@ export default class ConfirmTransaction extends Component {
if (isTokenMethodAction) { if (isTokenMethodAction) {
getTokenParams(to) getTokenParams(to)
} }
this.props.setTransactionToConfirm(transactionId || paramsTransactionId) const txId = transactionId || paramsTransactionId
if (txId) this.props.setTransactionToConfirm(txId)
} }
componentDidUpdate (prevProps) { componentDidUpdate (prevProps) {