Skip to content

A local-first personal finance app

enable GoCardless account selection if supported by the target institution (#5031)

Valentin Lorenzen47ee6eeb51f6
diff --git a/packages/sync-server/src/app-gocardless/services/gocardless-service.js b/packages/sync-server/src/app-gocardless/services/gocardless-service.js
index cecffabdbb..7b78b57d24 100644
--- a/packages/sync-server/src/app-gocardless/services/gocardless-service.js
+++ b/packages/sync-server/src/app-gocardless/services/gocardless-service.js
@@ -313,6 +313,8 @@ export const goCardlessService = {
await goCardlessService.setToken();
const institution = await goCardlessService.getInstitution(institutionId);
+ const accountSelection =
+ institution.supported_features?.includes('account_selection') ?? false;
let response;
try {
@@ -329,7 +331,7 @@ export const goCardlessService = {
userLanguage: 'en',
ssn: null,
redirectImmediate: false,
- accountSelection: false,
+ accountSelection,
});
} catch (error) {
handleGoCardlessError(error);
diff --git a/upcoming-release-notes/5031.md b/upcoming-release-notes/5031.md
new file mode 100644
index 0000000000..447521aa1c
--- /dev/null
+++ b/upcoming-release-notes/5031.md
@@ -0,0 +1,6 @@
+---
+category: Enhancements
+authors: [lorenzenv]
+---
+
+Enable GoCardless account selection if supported by the target institution