Handle undefined txParams

This commit is contained in:
Victor Baranov 2018-11-23 15:02:33 +03:00
parent ce217d57ea
commit 522d4723de
1 changed files with 2 additions and 1 deletions

View File

@ -517,7 +517,8 @@ class TransactionController extends EventEmitter {
_markNonceDuplicatesDropped (txId) {
// get the confirmed transactions nonce and from address
const txMeta = this.txStateManager.getTx(txId)
const { nonce, from } = txMeta.txParams
const txParams = (txMeta && txMeta.txParams) || {}
const { nonce, from } = txParams
const sameNonceTxs = this.txStateManager.getFilteredTxList({nonce, from})
if (!sameNonceTxs.length) return
// mark all same nonce transactions as dropped and give i a replacedBy hash