diff --git a/apps/data-service/src/providers/webshare.provider.ts b/apps/data-service/src/providers/webshare.provider.ts index 7006afd..b509b68 100644 --- a/apps/data-service/src/providers/webshare.provider.ts +++ b/apps/data-service/src/providers/webshare.provider.ts @@ -99,18 +99,16 @@ async function fetchProxiesFromWebShare(): Promise { const { getConfig } = await import('@stock-bot/config'); const config = getConfig(); - // Try environment variables first, then fall back to config - const apiKey = process.env.WEBSHARE_API_KEY || config.webshare?.apiKey; - const apiUrl = process.env.WEBSHARE_API_URL || config.webshare?.apiUrl; + // Get configuration from config system + const apiKey = config.webshare?.apiKey; + const apiUrl = config.webshare?.apiUrl; if (!apiKey || !apiUrl) { logger.error('Missing WebShare configuration', { hasApiKey: !!apiKey, hasApiUrl: !!apiUrl, - envApiKey: process.env.WEBSHARE_API_KEY?.substring(0, 10) + '...', - envApiUrl: process.env.WEBSHARE_API_URL, - configApiKey: config.webshare?.apiKey?.substring(0, 10) + '...', - configApiUrl: config.webshare?.apiUrl, + configApiKey: apiKey?.substring(0, 10) + '...', + configApiUrl: apiUrl, }); return null; }