From 978a4533f3b063c62a2a2e818e67f0e1fc42892e Mon Sep 17 00:00:00 2001 From: Step7750 Date: Sat, 4 May 2024 23:42:05 -0600 Subject: [PATCH] Restricts Inventory Picker If Previously Sent Non-Active Offer --- src/lib/components/trade_offer/auto_fill.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/components/trade_offer/auto_fill.ts b/src/lib/components/trade_offer/auto_fill.ts index 76f03bc6..46313807 100644 --- a/src/lib/components/trade_offer/auto_fill.ts +++ b/src/lib/components/trade_offer/auto_fill.ts @@ -304,7 +304,9 @@ export class AutoFill extends FloatElement { const tradesToBuyer = this.pendingTradesResponse.trades.filter((e) => e.buyer_id === UserThem?.strSteamId); - const tradesWithoutOffersToBuyer = tradesToBuyer.filter((e) => !e.steam_offer?.state || !e.steam_offer?.id); + const tradesWithoutOffersToBuyer = tradesToBuyer.filter( + (e) => !e.steam_offer?.state || !e.steam_offer?.id || ![2, 3].includes(e.steam_offer?.state) // 2, 3 correspond to "active" and "accepted" trade offers + ); if (tradesWithoutOffersToBuyer.length > 0 || hasQueryParameter('autofill')) { // Disable them being able to select random items from their inventory (ensure asset IDs match up) this.disableInventoryPicker();