some better logging here

This commit is contained in:
2025-07-26 09:12:18 -04:00
parent 9ec5fbf75a
commit cf6fed50d3

View File

@ -184,6 +184,9 @@ export async function pullData(amount = 100) {
await db`SELECT id, amount, description, date from transaction where account_id = ${account.id} AND pending=true`; await db`SELECT id, amount, description, date from transaction where account_id = ${account.id} AND pending=true`;
for (const pend of currentPend) { for (const pend of currentPend) {
const found = transactions.find((t) => t.transactionId === pend.id); const found = transactions.find((t) => t.transactionId === pend.id);
state.push(
`Pending transaction: ${pend.id} ${pend.description} ${pend.amount} on ${pend.date} found: ${found ? 'yes' : 'no'}`
);
if (!found) { if (!found) {
const updated = transactions.find( const updated = transactions.find(
(t) => t.amount == pend.amount && new Date(t.postedDate) == pend.date (t) => t.amount == pend.amount && new Date(t.postedDate) == pend.date