Merge pull request #1880 from MetaMask/pendingFix

fix getPendingTransactions function for pendingTxTracker
feature/default_network_editable
Frankie 7 years ago committed by GitHub
commit d40bd9a726
  1. 5
      app/scripts/controllers/transactions.js
  2. 2
      app/scripts/lib/pending-tx-tracker.js

@ -46,10 +46,11 @@ module.exports = class TransactionController extends EventEmitter {
return account.balance
},
publishTransaction: this.txProviderUtil.publishTransaction.bind(this.txProviderUtil),
getPendingTransactions: (address) => {
getPendingTransactions: () => {
const network = this.getNetwork()
return this.getFilteredTxList({
from: address,
status: 'submitted',
metamaskNetworkId: network,
})
},
})

@ -66,7 +66,7 @@ module.exports = class PendingTransactionTracker extends EventEmitter {
resubmitPendingTxs () {
const pending = this.getPendingTransactions('status', 'submitted')
const pending = this.getPendingTransactions()
// only try resubmitting if their are transactions to resubmit
if (!pending.length) return
pending.forEach((txMeta) => this._resubmitTx(txMeta).catch((err) => {

Loading…
Cancel
Save