diff --git a/ArchiSteamFarm/Steam/Exchange/Trading.cs b/ArchiSteamFarm/Steam/Exchange/Trading.cs index 8ef42d798..5321a8111 100644 --- a/ArchiSteamFarm/Steam/Exchange/Trading.cs +++ b/ArchiSteamFarm/Steam/Exchange/Trading.cs @@ -22,7 +22,6 @@ // limitations under the License. using System; -using System.Collections.Frozen; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -45,9 +44,6 @@ public sealed class Trading : IDisposable { internal const byte MaxItemsPerTrade = byte.MaxValue; // This is decided upon various factors, mainly stability of Steam servers when dealing with huge trade offers internal const byte MaxTradesPerAccount = 5; // This is limit introduced by Valve - [PublicAPI] - public static readonly FrozenSet TradeRestrictionsAppIDs = [730]; - private readonly Bot Bot; private readonly ConcurrentHashSet HandledTradeOfferIDs = []; private readonly SemaphoreSlim TradesSemaphore = new(1, 1); @@ -298,7 +294,7 @@ public sealed class Trading : IDisposable { IList tradeResults = await Utilities.InParallel(tasks).ConfigureAwait(false); - if (!Bot.BotDatabase.TradeRestrictionsAcknowledged && tradeResults.Any(static result => ((result.Result == ParseTradeResult.EResult.Accepted) && (result.ItemsToGive?.Any(static item => TradeRestrictionsAppIDs.Contains(item.AppID)) == true)) || (result.ItemsToReceive?.Any(static item => TradeRestrictionsAppIDs.Contains(item.AppID)) == true))) { + if (!Bot.BotDatabase.TradeRestrictionsAcknowledged && tradeResults.Any(static result => ((result.Result == ParseTradeResult.EResult.Accepted) && (result.ItemsToGive?.Any(static item => item.AppID != Asset.SteamAppID) == true)) || (result.ItemsToReceive?.Any(static item => item.AppID != Asset.SteamAppID) == true))) { // We should normally fail the process in case of a failure here, but since the popup could be marked already in the past, we'll allow it in hope it wasn't needed after all await AcknowledgeTradeRestrictions().ConfigureAwait(false); } diff --git a/ArchiSteamFarm/Steam/Interaction/Actions.cs b/ArchiSteamFarm/Steam/Interaction/Actions.cs index 2cd12d9c3..bac619575 100644 --- a/ArchiSteamFarm/Steam/Interaction/Actions.cs +++ b/ArchiSteamFarm/Steam/Interaction/Actions.cs @@ -460,7 +460,7 @@ public sealed class Actions : IAsyncDisposable, IDisposable { } // In similar way we might need to accept popup on Steam side, we limit it only to cases that we're aware of, as sending this request otherwise is additional overhead for no reason - if (!Bot.BotDatabase.TradeRestrictionsAcknowledged && items.Any(static item => Trading.TradeRestrictionsAppIDs.Contains(item.AppID))) { + if (!Bot.BotDatabase.TradeRestrictionsAcknowledged && items.Any(static item => item.AppID != Asset.SteamAppID)) { // We should normally fail the process in case of a failure here, but since the popup could be marked already in the past, we'll allow it in hope it wasn't needed after all await Bot.Trading.AcknowledgeTradeRestrictions().ConfigureAwait(false); }