You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ArchiSteamFarm/Steam/Exchange/Trading.cs
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@
22
22
// limitations under the License.
23
23
24
24
usingSystem;
25
+
usingSystem.Collections.Frozen;
25
26
usingSystem.Collections.Generic;
26
27
usingSystem.Linq;
27
28
usingSystem.Threading;
@@ -44,6 +45,9 @@ public sealed class Trading : IDisposable {
44
45
internalconstbyteMaxItemsPerTrade=byte.MaxValue;// This is decided upon various factors, mainly stability of Steam servers when dealing with huge trade offers
45
46
internalconstbyteMaxTradesPerAccount=5;// This is limit introduced by Valve
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))){
302
+
// 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
HashSet<ParseTradeResult>mobileTradeResults=tradeResults.Where(static result =>resultis{Result:ParseTradeResult.EResult.Accepted,Confirmed:false}).ToHashSet();
// 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
// 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
0 commit comments