Fix wallet code redeeming due to Steam changes

This commit is contained in:
Vitaliy Chumakov
2019-08-05 14:01:29 +03:00
parent 5fe8631e4f
commit a993b26e99

View File

@@ -2196,7 +2196,8 @@ namespace ArchiSteamFarm {
// Either bot will be changed, or loop aborted
currentBot = null;
} else {
if ((result.PurchaseResultDetail == EPurchaseResultDetail.CannotRedeemCodeFromClient) && (Bot.WalletCurrency != ECurrencyCode.Invalid)) {
if ((result.PurchaseResultDetail == EPurchaseResultDetail.BadActivationCode) && (Bot.WalletCurrency != ECurrencyCode.Invalid)) {
// We may try to assume that key is a wallet code, because Steam gives BadActivationCode in this case
// If it's a wallet code, we try to redeem it first, then handle the inner result as our primary one
(EResult Result, EPurchaseResultDetail? PurchaseResult)? walletResult = await currentBot.ArchiWebHandler.RedeemWalletKey(key).ConfigureAwait(false);