Private
Public Access
1
0

Split SimpleFIN connections by institution

Group discovered SimpleFIN accounts by institution and create a
separate SyncConnection per institution so each bank appears as
its own card in the UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Catherine Renelle
2026-02-08 23:26:49 -05:00
parent 54a15cf3cf
commit a2b12d9abd
5 changed files with 46 additions and 29 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export const bankSyncApi = {
api.post<SyncConnection>('/bank-sync/plaid/complete-link', { publicToken }),
connectSimpleFin: (setupToken: string) =>
api.post<SyncConnection>('/bank-sync/simplefin/connect', { setupToken }),
api.post<SyncConnection[]>('/bank-sync/simplefin/connect', { setupToken }),
discoverAccounts: (connectionId: string) =>
api.get<DiscoveredAccount[]>(`/bank-sync/connections/${connectionId}/discover-accounts`),
+8 -4
View File
@@ -728,12 +728,16 @@ function loadPlaidScript(): Promise<void> {
async function connectSimpleFin() {
simpleFinLoading.value = true
try {
const { data: conn } = await bankSyncApi.connectSimpleFin(simpleFinToken.value)
connections.value.unshift(conn)
syncIntervals[conn.id] = conn.syncIntervalMinutes
const { data: newConnections } = await bankSyncApi.connectSimpleFin(simpleFinToken.value)
for (const conn of newConnections) {
connections.value.unshift(conn)
syncIntervals[conn.id] = conn.syncIntervalMinutes
}
showSimpleFinDialog.value = false
simpleFinToken.value = ''
openMappingDialog(conn)
if (newConnections.length > 0) {
openMappingDialog(newConnections[0])
}
} catch (err: any) {
errorMessage.value = err.response?.data?.error || 'Failed to connect via SimpleFIN. Check your setup token.'
showError.value = true