Remove password confirmation
MODIFY
WalletWasabi.Gui/Tabs/WalletManager/GenerateWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/GenerateWalletViewModel.cs
@@ -17,7 +17,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
internal class GenerateWalletViewModel : CategoryViewModel
{
private string _password;
- private string _passwordConfirmation;
private string _walletName;
private bool _termsAccepted;
private string _validationMessage;
@@ -41,20 +40,12 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
if (lastChar == '\r' || lastChar == '\n') // If the last character is cr or lf then act like it'd be a sign to do the job.
{
Password = x.TrimEnd('\r', '\n');
- }
- }
- });
- this.WhenAnyValue(x => x.PasswordConfirmation).Subscribe(x =>
- {
- if (x.NotNullAndNotEmpty())
- {
- char lastChar = x.Last();
- if (lastChar == '\r' || lastChar == '\n') // If the last character is cr or lf then act like it'd be a sign to do the job.
+ if (TermsAccepted)
{
- PasswordConfirmation = x.TrimEnd('\r', '\n');
DoGenerateCommand();
}
}
+ }
});
}
@@ -64,7 +55,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
string walletFilePath = Path.Combine(Global.WalletsDir, $"{WalletName}.json");
Password = Guard.Correct(Password); // Don't let whitespaces to the beginning and to the end.
- PasswordConfirmation = Guard.Correct(PasswordConfirmation); // Don't let whitespaces to the beginning and to the end.
if (!TermsAccepted)
{
@@ -78,10 +68,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
{
ValidationMessage = $"The name {WalletName} is already taken.";
}
- else if (Password != PasswordConfirmation)
- {
- ValidationMessage = $"The passwords do not match.";
- }
else
{
try
@@ -104,12 +90,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
set { this.RaiseAndSetIfChanged(ref _password, value); }
}
- public string PasswordConfirmation
- {
- get { return _passwordConfirmation; }
- set { this.RaiseAndSetIfChanged(ref _passwordConfirmation, value); }
- }
-
public string WalletName
{
get { return _walletName; }
@@ -150,7 +130,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
base.OnCategorySelected();
Password = "";
- PasswordConfirmation = "";
WalletName = Utils.GetNextWalletName();
TermsAccepted = false;
ValidationMessage = "";

Remove password confirmation