mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
preserve other networks TXs
This commit is contained in:
parent
7dc1b09f94
commit
c1b7cfe91d
@ -223,10 +223,11 @@ module.exports = class TransactionStateManger extends EventEmitter {
|
|||||||
|
|
||||||
wipeTransactions (address) {
|
wipeTransactions (address) {
|
||||||
// network only tx
|
// network only tx
|
||||||
const txs = this.getTxList()
|
const txs = this.getFullTxList()
|
||||||
|
const network = this.getNetwork()
|
||||||
|
|
||||||
// Filter out the ones from the current account
|
// Filter out the ones from the current account and network
|
||||||
const otherAccountTxs = txs.filter((txMeta) => txMeta.txParams.from !== address)
|
const otherAccountTxs = txs.filter((txMeta) => !(txMeta.txParams.from === address && txMeta.metamaskNetworkId === network))
|
||||||
|
|
||||||
// Update state
|
// Update state
|
||||||
this._saveTxList(otherAccountTxs)
|
this._saveTxList(otherAccountTxs)
|
||||||
|
Loading…
Reference in New Issue
Block a user