Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions agent/src/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,9 @@ apiRouter.post('/requests/create', async (request: Request, response: Response)
}
: undefined

// When credential_sets is used we need to add the wero card to each group so that it will always be requested when also requesting a payment
if (transactionAuthorizationType === 'payment') {
// When credential_sets is used we need to add the wero card to each group so that it will always be requested when also requesting a payment.
// If the request did not define credential_sets originally, the default set generated by dcqlQueryFromRequest already includes all credentials (including the appended wero card), so we must not push again.
if (transactionAuthorizationType === 'payment' && definition.credential_sets) {
queryLanguageDefinition.credential_sets?.forEach((cs) => {
cs.options.map((opts) => opts.push(credentialIds[credentialIds.length - 1]))
})
Expand Down
2 changes: 1 addition & 1 deletion agent/src/issuers/openHorizonBank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export async function updatePaymentStatusForWeroCredential(
latest.content.statusCode = statusCode
await agent.genericRecords.update(latest)
agent.config.logger.info(`openHorizonBank: payment ${paymentTransactionId} updated to ${statusCode}`)
}, 30_000)
}, 20_000)
}

export const openHorizonBankCredentialsData = {
Expand Down