From 4f279f1068967dca1465b871575eeda024d5725f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Tue, 10 Jun 2025 11:19:20 +0200 Subject: [PATCH] Misc --- ArchiSteamFarm/Steam/Bot.cs | 2 +- ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ArchiSteamFarm/Steam/Bot.cs b/ArchiSteamFarm/Steam/Bot.cs index fad8942da..a26e5b986 100644 --- a/ArchiSteamFarm/Steam/Bot.cs +++ b/ArchiSteamFarm/Steam/Bot.cs @@ -73,7 +73,7 @@ public sealed class Bot : IAsyncDisposable, IDisposable { private const byte ExtraStorePackagesValidForDays = 7; private const byte LoginCooldownInMinutes = 25; // Captcha disappears after around 20 minutes, so we make it 25 private const uint LoginID = 1242; // This must be the same for all ASF bots and all ASF processes - private const byte MaxLoginFailures = WebBrowser.MaxTries; // Max login failures in a row before we determine that our credentials are invalid (because Steam wrongly returns those, of course)course) + private const byte MaxLoginFailures = 3; // Max login failures in a row before we determine that our credentials are invalid (because Steam wrongly returns those, of course) private const byte MinimumAccessTokenValidityMinutes = 5; private const byte RedeemCooldownInHours = 1; // 1 hour since first redeem attempt, this is a limitation enforced by Steam private const byte RegionRestrictionPlayableBlockMonths = 3; diff --git a/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs b/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs index 435b7d16c..d45908c89 100644 --- a/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs +++ b/ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs @@ -2351,12 +2351,15 @@ public sealed class ArchiWebHandler : IDisposable { } } - private async ValueTask UnlockParentalAccount(string parentalCode) { + private async Task UnlockParentalAccount(string parentalCode) { ArgumentException.ThrowIfNullOrEmpty(parentalCode); Bot.ArchiLogger.LogGenericInfo(Strings.UnlockingParentalAccount); - bool[] results = await Task.WhenAll(UnlockParentalAccountForService(SteamCommunityURL, parentalCode), UnlockParentalAccountForService(SteamStoreURL, parentalCode)).ConfigureAwait(false); + bool[] results = await Task.WhenAll( + UnlockParentalAccountForService(SteamCommunityURL, parentalCode), + UnlockParentalAccountForService(SteamStoreURL, parentalCode) + ).ConfigureAwait(false); if (results.Any(static result => !result)) { Bot.ArchiLogger.LogGenericWarning(Strings.WarningFailed);