From 9f100af491e3f6e438d3214de03e18e9a0ce2317 Mon Sep 17 00:00:00 2001 From: NguyenND Date: Fri, 5 Jun 2026 10:00:33 -0400 Subject: [PATCH] 06/05 Optimize app: fix Plaid link --- app/config.py | 1 + app/services/plaid_service.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/config.py b/app/config.py index ced6a1f..0476c48 100644 --- a/app/config.py +++ b/app/config.py @@ -33,6 +33,7 @@ class Config: # Plaid (sandbox / development / production) PLAID_CLIENT_ID = os.environ.get('PLAID_CLIENT_ID', '') PLAID_SECRET = os.environ.get('PLAID_SECRET', '') + # Valid values: sandbox, production (Plaid retired the 'development' environment) PLAID_ENV = os.environ.get('PLAID_ENV', 'sandbox') # Schwab Developer API (OAuth 2.0) diff --git a/app/services/plaid_service.py b/app/services/plaid_service.py index 19caa44..a4eefb0 100644 --- a/app/services/plaid_service.py +++ b/app/services/plaid_service.py @@ -25,9 +25,10 @@ from flask import current_app log = logging.getLogger(__name__) PLAID_HOSTS = { - 'sandbox': 'https://sandbox.plaid.com', - 'development': 'https://development.plaid.com', - 'production': 'https://production.plaid.com', + 'sandbox': 'https://sandbox.plaid.com', + 'production': 'https://production.plaid.com', + # 'development' was sunset by Plaid — map it to production so old configs don't break + 'development': 'https://production.plaid.com', } # Plaid top-level category → PFM category name