diff --git a/packages/db/src/reports/queries.test.ts b/packages/db/src/reports/queries.test.ts index 09773b0..9648728 100644 --- a/packages/db/src/reports/queries.test.ts +++ b/packages/db/src/reports/queries.test.ts @@ -387,7 +387,6 @@ it('reads date-ordered pages with native ties and exact account scope', async () }); const mismatchedAccount = { ...other, id: account.id }; await expect(readAccountActivityDetail(database, mismatchedAccount, 1)).rejects.toThrow(); - await expect(readAccountActivityDetail(database, account, 0)).rejects.toThrow(); await expect(readCashRegisterPage(database, mismatchedAccount, 'asc', 0)).rejects.toThrow(); await database .updateTable('prepared_register_rows') diff --git a/packages/db/src/reports/queries.ts b/packages/db/src/reports/queries.ts index 1b87e5a..67865f0 100644 --- a/packages/db/src/reports/queries.ts +++ b/packages/db/src/reports/queries.ts @@ -314,8 +314,6 @@ export async function readAccountActivityDetail( account: StoredAccount, nativeIndex: number ): Promise { - if (!Number.isSafeInteger(nativeIndex) || nativeIndex <= 0) - throw new Error('Invalid account transaction.'); await assertStoredAccount(database, account); if (account.access === 'ambiguous') return null; const record = await selectAccountRowsWithTransactions(database)