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