mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-05 16:41:01 +00:00
Fix wallet code redeeming due to Steam changes (#1358)
* Fix wallet code redeeming due to Steam changes
* Revert "Fix wallet code redeeming due to Steam changes"
This reverts commit a993b26e
* Add AssumeWalletKeyOnBadActivationCode parameter to RedeemingPreferences, add according flags for redeem^
This commit is contained in:
committed by
Łukasz Domeradzki
parent
5fe8631e4f
commit
737aa622b7
@@ -2793,6 +2793,8 @@ namespace ArchiSteamFarm {
|
||||
|
||||
ArchiLogger.LogGenericInfo(Strings.Starting);
|
||||
|
||||
bool assumeWalletKeyOnBadActivationCode = BotConfig.RedeemingPreferences.HasFlag(BotConfig.ERedeemingPreferences.AssumeWalletKeyOnBadActivationCode);
|
||||
|
||||
while (IsConnectedAndLoggedOn && BotDatabase.HasGamesToRedeemInBackground) {
|
||||
(string key, string name) = BotDatabase.GetGameToRedeemInBackground();
|
||||
|
||||
@@ -2808,7 +2810,7 @@ namespace ArchiSteamFarm {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((result.PurchaseResultDetail == EPurchaseResultDetail.CannotRedeemCodeFromClient) && (WalletCurrency != ECurrencyCode.Invalid)) {
|
||||
if (((result.PurchaseResultDetail == EPurchaseResultDetail.CannotRedeemCodeFromClient) || ((result.PurchaseResultDetail == EPurchaseResultDetail.BadActivationCode) && assumeWalletKeyOnBadActivationCode)) && (WalletCurrency != ECurrencyCode.Invalid)) {
|
||||
// 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 ArchiWebHandler.RedeemWalletKey(key).ConfigureAwait(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user