From c1b7cfe91d803c0085afe59d058f2422a0e8dc30 Mon Sep 17 00:00:00 2001 From: Bruno Barbieri Date: Wed, 31 Jan 2018 13:29:02 -0500 Subject: [PATCH] preserve other networks TXs --- app/scripts/lib/tx-state-manager.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/scripts/lib/tx-state-manager.js b/app/scripts/lib/tx-state-manager.js index f488130a2..051efd247 100644 --- a/app/scripts/lib/tx-state-manager.js +++ b/app/scripts/lib/tx-state-manager.js @@ -223,10 +223,11 @@ module.exports = class TransactionStateManger extends EventEmitter { wipeTransactions (address) { // network only tx - const txs = this.getTxList() + const txs = this.getFullTxList() + const network = this.getNetwork() - // Filter out the ones from the current account - const otherAccountTxs = txs.filter((txMeta) => txMeta.txParams.from !== address) + // Filter out the ones from the current account and network + const otherAccountTxs = txs.filter((txMeta) => !(txMeta.txParams.from === address && txMeta.metamaskNetworkId === network)) // Update state this._saveTxList(otherAccountTxs)