From 14d4c107e54e2a3000a826818b00667635033611 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Thu, 30 Apr 2020 11:38:33 -0300 Subject: [PATCH] Backport "Don't updatePendingTxs outside of block updates (#8445)" (#8474) Backport #8445 to v7.7.9. Original commit description: * Don't updatePendingTxs outside of block updates Refs #8377 Reverts 507397f6c (#5431) * Check for new block data on unlock Co-authored-by: Whymarrh Whitby --- app/scripts/controllers/transactions/index.js | 1 - app/scripts/metamask-controller.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js index fa82b4f19..808c224c3 100644 --- a/app/scripts/controllers/transactions/index.js +++ b/app/scripts/controllers/transactions/index.js @@ -724,7 +724,6 @@ class TransactionController extends EventEmitter { Updates the memStore in transaction controller */ _updateMemstore () { - this.pendingTxTracker.updatePendingTxs() const unapprovedTxs = this.txStateManager.getUnapprovedTxList() const selectedAddressTxList = this.txStateManager.getFilteredTxList({ from: this.getSelectedAddress(), diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 9eb46a40e..0d7b0a598 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -767,7 +767,7 @@ module.exports = class MetamaskController extends EventEmitter { } await this.preferencesController.syncAddresses(accounts) - await this.txController.pendingTxTracker.updatePendingTxs() + await this.blockTracker.checkForLatestBlock() try { const threeBoxSyncingAllowed = this.threeBoxController.getThreeBoxSyncingState()