Skip to content

Commit

Permalink
Fix updating of pending transactions
Browse files Browse the repository at this point in the history
Transaction statuses were not being properly updated when:

- MetaMask was unlocked
- The network was changed

This PR fixes both of those. Fixes #5174
  • Loading branch information
danfinlay committed Oct 5, 2018
1 parent 182970c commit 507397f
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 154 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Current Develop Branch

- Update transaction statuses when switching networks.

## 4.12.0 Thursday September 27 2018

- Reintroduces changes from 4.10.0
Expand Down
1 change: 1 addition & 0 deletions app/scripts/controllers/transactions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ 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(),
Expand Down
1 change: 1 addition & 0 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ module.exports = class MetamaskController extends EventEmitter {
}

await this.preferencesController.syncAddresses(accounts)
await this.txController.pendingTxTracker.updatePendingTxs()
return this.keyringController.fullUpdate()
}

Expand Down
Loading

0 comments on commit 507397f

Please sign in to comment.