Move trimmedPassword set later to prevent double value giving.
MODIFY
WalletWasabi/Userfacing/PasswordHelper.cs
WalletWasabi/Userfacing/PasswordHelper.cs
@@ -70,14 +70,13 @@ namespace WalletWasabi.Userfacing
public static bool IsTrimable(string? password, out string? trimmedPassword)
{
- trimmedPassword = password;
-
if (password is {} && password.IsTrimable())
{
trimmedPassword = password.Trim();
return true;
}
+ trimmedPassword = password;
return false;
}

Move trimmedPassword set later to prevent double value giving.