|
|
@ -41,7 +41,7 @@ while (transactions.length <= 100) { |
|
|
|
// This is an old migration, let's allow it
|
|
|
|
// This is an old migration, let's allow it
|
|
|
|
// eslint-disable-next-line no-loop-func
|
|
|
|
// eslint-disable-next-line no-loop-func
|
|
|
|
if (!deletableTxStates.find((s) => s === status)) { |
|
|
|
if (!deletableTxStates.find((s) => s === status)) { |
|
|
|
nonDeletableCount++ |
|
|
|
nonDeletableCount += 1 |
|
|
|
} |
|
|
|
} |
|
|
|
transactions.push({ status }) |
|
|
|
transactions.push({ status }) |
|
|
|
} |
|
|
|
} |
|
|
@ -67,7 +67,7 @@ describe('storage is migrated successfully and the proper transactions are remov |
|
|
|
const migratedTransactions = migratedData.data.TransactionController.transactions |
|
|
|
const migratedTransactions = migratedData.data.TransactionController.transactions |
|
|
|
migratedTransactions.forEach((tx) => { |
|
|
|
migratedTransactions.forEach((tx) => { |
|
|
|
if (!deletableTxStates.find((s) => s === tx.status)) { |
|
|
|
if (!deletableTxStates.find((s) => s === tx.status)) { |
|
|
|
leftoverNonDeletableTxCount++ |
|
|
|
leftoverNonDeletableTxCount += 1 |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
assert.equal(leftoverNonDeletableTxCount, nonDeletableCount, "migration shouldn't delete transactions we want to keep") |
|
|
|
assert.equal(leftoverNonDeletableTxCount, nonDeletableCount, "migration shouldn't delete transactions we want to keep") |
|
|
|