1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-08 23:15:24 +02:00

Merge remote-tracking branch 'upstream/main' into security-pricing-service

This commit is contained in:
Tyler Myracle 2024-01-21 03:14:48 -06:00
commit 8ee64488fc

View file

@ -196,10 +196,13 @@ export class TellerETL implements IETL<Connection, TellerRawData, TellerData> {
private async _extractTransactions(
accessToken: string,
accounts: TellerTypes.AccountWithBalances[]
tellerAccounts: TellerTypes.GetAccountsResponse
) {
const accountTransactions = await Promise.all(
accounts.map(async (tellerAccount) => {
tellerAccounts.map(async (tellerAccount) => {
const type = TellerUtil.getType(tellerAccount.type)
const classification = AccountUtil.getClassification(type)
const transactions = await SharedUtil.withRetry(
() =>
this.teller.getTransactions({
@ -210,9 +213,6 @@ export class TellerETL implements IETL<Connection, TellerRawData, TellerData> {
maxRetries: 3,
}
)
const type = TellerUtil.getType(tellerAccount.type)
const classification = AccountUtil.getClassification(type)
if (classification === AccountClassification.asset) {
transactions.forEach((t) => {
t.amount = String(Number(t.amount) * -1)