diff --git a/src/Managing.Infrastructure.Web3/Services/KaigenService.cs b/src/Managing.Infrastructure.Web3/Services/KaigenService.cs index 305ad977..78f0bdf6 100644 --- a/src/Managing.Infrastructure.Web3/Services/KaigenService.cs +++ b/src/Managing.Infrastructure.Web3/Services/KaigenService.cs @@ -45,12 +45,6 @@ public class KaigenService : IKaigenService var creditsEnabledEnv = Environment.GetEnvironmentVariable("KAIGEN_CREDITS_ENABLED"); _creditsEnabled = !string.IsNullOrEmpty(creditsEnabledEnv) && creditsEnabledEnv.ToLower() == "true"; - if (!_creditsEnabled) - { - _logger.LogInformation("Kaigen credits are disabled via KAIGEN_CREDITS_ENABLED environment variable"); - return; // Skip secret key validation if credits are disabled - } - // Always read from environment variable for security var envSecretKey = Environment.GetEnvironmentVariable("KAIGEN_SECRET_KEY"); if (!string.IsNullOrEmpty(envSecretKey)) @@ -59,7 +53,7 @@ public class KaigenService : IKaigenService _logger.LogInformation("Using KAIGEN_SECRET_KEY from environment variable"); } - // Validate required settings only if credits are enabled + // Validate required settings if (string.IsNullOrEmpty(_settings.SecretKey)) { throw new InvalidOperationException( @@ -172,14 +166,6 @@ public class KaigenService : IKaigenService public async Task GetOwnedKeysAsync(User user) { - // If credits are disabled, return empty response - if (!_creditsEnabled) - { - _logger.LogInformation("Credits disabled - returning empty owned keys for user {UserName}", - user.Name); - return new OwnedKeysResponse { Items = new List(), Overall = 0 }; - } - try { var walletAddress = GetUserWalletAddress(user);