mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 20:39:08 +01:00
Merge pull request #3917 from MetaMask/kumavis-patch-3
tx-state-manager - dont remove old tx history if candidate is not found
This commit is contained in:
commit
2b787f2833
@ -92,9 +92,11 @@ module.exports = class TransactionStateManager extends EventEmitter {
|
||||
// or rejected tx's.
|
||||
// not tx's that are pending or unapproved
|
||||
if (txCount > txHistoryLimit - 1) {
|
||||
const index = transactions.findIndex((metaTx) => metaTx.status === 'confirmed' || metaTx.status === 'rejected')
|
||||
let index = transactions.findIndex((metaTx) => metaTx.status === 'confirmed' || metaTx.status === 'rejected')
|
||||
if (index !== -1) {
|
||||
transactions.splice(index, 1)
|
||||
}
|
||||
}
|
||||
transactions.push(txMeta)
|
||||
this._saveTxList(transactions)
|
||||
return txMeta
|
||||
|
Loading…
Reference in New Issue
Block a user