Skip to content

Commit

Permalink
Remove Chase from plaid and disable cache
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Oct 4, 2024
1 parent 4c9362c commit 1b7875f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions apps/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"@hono/zod-openapi": "^0.16.3",
"@hono/zod-validator": "^0.3.0",
"hono": "^4.6.3",
"plaid": "^27.0.0",
"plaid": "^28.0.0",
"typesense": "^1.8.2",
"xior": "^0.6.1",
"zod": "^3.23.8"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240909.0",
"@cloudflare/workers-types": "^4.20240925.0",
"@types/bun": "^1.1.10",
"wrangler": "^3.79.0"
}
Expand Down
3 changes: 0 additions & 3 deletions apps/engine/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ app.use(loggingMiddleware);

// Enable cache for the following routes
app.get("/institutions", cacheMiddleware);
app.get("/accounts", cacheMiddleware);
app.get("/accounts/balance", cacheMiddleware);
app.get("/transactions", cacheMiddleware);
app.get("/rates", cacheMiddleware);

app
Expand Down
1 change: 1 addition & 0 deletions apps/engine/src/providers/gocardless/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ export function getAccessValidForDays({
"LLOYDS_LOYDGB2L",
"HALIFAX_HLFXGB22",
"BANK_OF_SCOTLAND_COMMERCIAL_BOFSGBS1",
"FINOM_SOBKDEBB",
];

if (RESTRICTED_TO_90DAYS.some((str) => str.startsWith(institutionId))) {
Expand Down
7 changes: 6 additions & 1 deletion apps/engine/src/routes/institutions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
UpdateUsageParamsSchema,
UpdateUsageSchema,
} from "./schema";
import { excludedInstitutions } from "./utils";

const app = new OpenAPIHono<{ Bindings: Bindings }>();

Expand Down Expand Up @@ -108,9 +109,13 @@ app.openapi(indexRoute, async (c) => {

const data: SearchResult = JSON.parse(resultString);

const filteredInstitutions = data.hits.filter(
({ document }) => !excludedInstitutions.includes(document.id),
);

return c.json(
{
data: data.hits?.map(({ document }) => ({
data: filteredInstitutions.map(({ document }) => ({
id: document.id,
name: document.name,
logo: document.logo ?? null,
Expand Down
4 changes: 4 additions & 0 deletions apps/engine/src/routes/institutions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { PlaidProvider } from "@/providers/plaid/plaid-provider";
import { TellerProvider } from "@/providers/teller/teller-provider";
import type { ProviderParams } from "@/providers/types";

export const excludedInstitutions = [
"ins_56", // Chase - Plaid
];

export async function getInstitutions(
params: Omit<
ProviderParams & { countryCode: string; storage: R2Bucket },
Expand Down
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"typecheck": "turbo typecheck"
},
"dependencies": {
"@biomejs/biome": "1.9.1",
"@biomejs/biome": "1.9.3",
"@manypkg/cli": "^0.21.4",
"turbo": "2.1.2",
"turbo": "2.1.3",
"typescript": "^5.6.2"
},
"packageManager": "[email protected]",
Expand Down

0 comments on commit 1b7875f

Please sign in to comment.