From e6f70f4ab4f71e302ddcd16fd9f547b19cb36063 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Wed, 11 Mar 2026 19:41:49 -0500 Subject: [PATCH] fix(api): update PlaidClientOptions to set environment to Development in production --- .../DependencyInjection/ServiceCollectionExtensions.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/FiscalOS.Infra/DependencyInjection/ServiceCollectionExtensions.cs b/src/FiscalOS.Infra/DependencyInjection/ServiceCollectionExtensions.cs index 5ef4362..2b9a936 100644 --- a/src/FiscalOS.Infra/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/FiscalOS.Infra/DependencyInjection/ServiceCollectionExtensions.cs @@ -1,3 +1,5 @@ +using Microsoft.AspNetCore.Hosting; + namespace FiscalOS.Infra.DependencyInjection; public static class ServiceCollectionExtensions @@ -31,6 +33,12 @@ public static class ServiceCollectionExtensions var logger = sp.GetRequiredService>(); var clientOptions = sp.GetRequiredService>(); var options = clientOptions.Value.ToPlaidOptions(); + + if (sp.GetRequiredService().IsProduction()) + { + options.Value.Environment = Going.Plaid.Environment.Development; + } + return new PlaidClient(options, factory, logger); }); services.AddSingleton(PlaidAccountService.From);