From 8850e0c934c4ce744c6666daf35703a0e11610ae Mon Sep 17 00:00:00 2001 From: Benjamin Cooper Date: Wed, 11 Mar 2020 21:47:22 +0000 Subject: [PATCH] start allowing transaction failure --- lib/fetch.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/fetch.js b/lib/fetch.js index 5883a31..1f5362f 100644 --- a/lib/fetch.js +++ b/lib/fetch.js @@ -26,6 +26,17 @@ const plaidAccountTokens = Object.keys(process.env) })); exports.fetchTransactions = async function(isPrivate = true) { + const transactions = []; + + for (let { account, token } of plaidAccountTokens) { + const tokenTransactions = await client.getTransactions( + token, + startDate, + moment().format('YYYY-MM-DD'), + ...transactionFetchOptions, + ); + } + const rawTransactions = await Promise.all( plaidAccountTokens.map(({ account, token }) => { // @ts-ignore