mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Improve unusedKeys to take in account failures as well
This commit is contained in:
@@ -2169,7 +2169,7 @@ namespace ArchiSteamFarm {
|
||||
response.Append(Environment.NewLine + string.Format(Strings.BotRedeemResponse, currentBot.BotName, key, result.PurchaseResult));
|
||||
}
|
||||
|
||||
if (result.PurchaseResult == ArchiHandler.PurchaseResponseCallback.EPurchaseResult.OK) {
|
||||
if (result.PurchaseResult != ArchiHandler.PurchaseResponseCallback.EPurchaseResult.Timeout) {
|
||||
unusedKeys.Remove(key);
|
||||
}
|
||||
|
||||
@@ -2215,11 +2215,7 @@ namespace ArchiSteamFarm {
|
||||
case ArchiHandler.PurchaseResponseCallback.EPurchaseResult.InvalidKey:
|
||||
case ArchiHandler.PurchaseResponseCallback.EPurchaseResult.OK:
|
||||
alreadyHandled = true; // This key is already handled, as we either redeemed it or we're sure it's dupe/invalid
|
||||
|
||||
if (otherResult.PurchaseResult == ArchiHandler.PurchaseResponseCallback.EPurchaseResult.OK) {
|
||||
unusedKeys.Remove(key);
|
||||
}
|
||||
|
||||
unusedKeys.Remove(key);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user