This commit is contained in:
JustArchi
2016-06-25 07:03:39 +02:00
parent 339a56dc80
commit 9bc76ca1fe
2 changed files with 2 additions and 0 deletions

View File

@@ -679,6 +679,7 @@ namespace ArchiSteamFarm {
return "Trade offer failed due to error!";
}
await Task.Delay(1000).ConfigureAwait(false); // Sometimes we can be too fast for Steam servers to generate confirmations, wait a short moment
await AcceptConfirmations(true, Steam.ConfirmationDetails.EType.Trade, BotConfig.SteamMasterID).ConfigureAwait(false);
return "Trade offer sent successfully!";
}

View File

@@ -111,6 +111,7 @@ namespace ArchiSteamFarm {
ParseTradeResult[] results = await Task.WhenAll(tasks).ConfigureAwait(false);
if (results.Any(result => result == ParseTradeResult.AcceptedWithItemLose)) {
await Task.Delay(1000).ConfigureAwait(false); // Sometimes we can be too fast for Steam servers to generate confirmations, wait a short moment
HashSet<ulong> tradeIDs = new HashSet<ulong>(tradeOffers.Select(tradeOffer => tradeOffer.TradeOfferID));
await Bot.AcceptConfirmations(true, Steam.ConfirmationDetails.EType.Trade, 0, tradeIDs).ConfigureAwait(false);
}