We already apply this logic further below, the bool switch is useless
This commit is contained in:
Archi 2021-11-25 17:06:31 +01:00
parent b00e157349
commit ab982604cf
No known key found for this signature in database
GPG key ID: 6B138B4C64555AEA
2 changed files with 2 additions and 7 deletions

View file

@ -863,7 +863,7 @@ public sealed class Bot : IAsyncDisposable {
break;
case ASF.EUserInputType.Password:
BotConfig.SetDecryptedSteamPassword(inputValue, true);
BotConfig.SetDecryptedSteamPassword(inputValue);
BotConfig.IsSteamPasswordSet = false;
break;

View file

@ -607,18 +607,13 @@ public sealed class BotConfig {
return (botConfig, json != latestJson ? latestJson : null);
}
internal void SetDecryptedSteamPassword(string? decryptedSteamPassword, bool fromUser = false) {
internal void SetDecryptedSteamPassword(string? decryptedSteamPassword) {
if (!string.IsNullOrEmpty(decryptedSteamPassword) && PasswordFormat.HasTransformation()) {
// ReSharper disable once RedundantSuppressNullableWarningExpression - required for .NET Framework
decryptedSteamPassword = ArchiCryptoHelper.Encrypt(PasswordFormat, decryptedSteamPassword!);
}
SteamPassword = decryptedSteamPassword;
if (fromUser) {
// Reset steam password set flag, it actually isn't set in the config
IsSteamPasswordSet = false;
}
}
public enum EAccess : byte {