better pending handling
This commit is contained in:
@ -183,7 +183,7 @@ export async function pullData(amount = 100) {
|
||||
let currentPend =
|
||||
await db`SELECT id, amount, description, date from transaction where account_id = ${account.id} AND pending=true`;
|
||||
for (const pend of currentPend) {
|
||||
const found = transactions.find((t) => t.transactionId === pend.id);
|
||||
const found = transactions.find((t) => `${t.postedDate}:${t.amount}` === pend.id);
|
||||
state.push(
|
||||
`Pending transaction: ${pend.id} ${pend.description} ${pend.amount} on ${pend.date} found: ${found ? 'yes' : 'no'}`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user