Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions apps/api/src/tasks/bank-import/import-transactions.task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,11 @@ export class IrisTasks {
try {
const account = await this.getIrisUserIBANaccount()

if (!account) return Logger.error(`no consent granted for IBAN: ${this.IBAN}`)
if (account.consents.consents[0].status !== 'valid')
return Logger.error(`consent expired for IBAN: ${this.IBAN}`)
// if (!account) return Logger.error(`no consent granted for IBAN: ${this.IBAN}`)
if (!account || account.consents.consents[0].status !== 'valid') {
await this.notifyForExpiringIrisConsentTASK()
return Logger.error(`consent expired or not found for IBAN: ${this.IBAN}`)
}

ibanAccount = account
} catch (e) {
Expand Down
Loading