diff --git a/ArchiSteamFarm/Steam/Interaction/Actions.cs b/ArchiSteamFarm/Steam/Interaction/Actions.cs index 5cfe285f2..0e3800535 100644 --- a/ArchiSteamFarm/Steam/Interaction/Actions.cs +++ b/ArchiSteamFarm/Steam/Interaction/Actions.cs @@ -115,6 +115,23 @@ public sealed class Actions : IAsyncDisposable, IDisposable { return (success, token, success ? Strings.Success : Strings.WarningFailed); } + [PublicAPI] + public async Task<(bool Success, IReadOnlyCollection? Confirmations, string Message)> GetConfirmations() { + if (Bot.BotDatabase.MobileAuthenticator == null) { + return (false, null, Strings.BotNoASFAuthenticator); + } + + if (!Bot.IsConnectedAndLoggedOn) { + return (false, null, Strings.BotNotConnected); + } + + ImmutableHashSet? confirmations = await Bot.BotDatabase.MobileAuthenticator.GetConfirmations().ConfigureAwait(false); + + bool success = confirmations != null; + + return (success, confirmations, success ? Strings.Success : Strings.WarningFailed); + } + [PublicAPI] public ulong GetFirstSteamMasterID() { ulong steamMasterID = Bot.BotConfig.SteamUserPermissions.Where(kv => (kv.Key > 0) && (kv.Key != Bot.SteamID) && new SteamID(kv.Key).IsIndividualAccount && (kv.Value == BotConfig.EAccess.Master)).Select(static kv => kv.Key).OrderBy(static steamID => steamID).FirstOrDefault(); @@ -135,23 +152,6 @@ public sealed class Actions : IAsyncDisposable, IDisposable { return new SemaphoreLock(TradingSemaphore); } - [PublicAPI] - public async Task<(bool Success, IReadOnlyCollection? Confirmations, string Message)> GetConfirmations() { - if (Bot.BotDatabase.MobileAuthenticator == null) { - return (false, null, Strings.BotNoASFAuthenticator); - } - - if (!Bot.IsConnectedAndLoggedOn) { - return (false, null, Strings.BotNotConnected); - } - - ImmutableHashSet? confirmations = await Bot.BotDatabase.MobileAuthenticator.GetConfirmations().ConfigureAwait(false); - - bool success = confirmations != null; - - return (success, confirmations, success ? Strings.Success : Strings.WarningFailed); - } - [PublicAPI] public async Task<(bool Success, IReadOnlyCollection? HandledConfirmations, string Message)> HandleTwoFactorAuthenticationConfirmations(bool accept, Confirmation.EConfirmationType? acceptedType = null, IReadOnlyCollection? acceptedCreatorIDs = null, bool waitIfNeeded = false) { if (Bot.BotDatabase.MobileAuthenticator == null) {