No need to register validation methods.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
@@ -54,8 +54,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
Global = Locator.Current.GetService<Global>();
Wallet = wallet;
- RegisterValidationMethod(nameof(Password), ValidatePassword);
-
Password = "";
TimeLeftTillRoundTimeout = TimeSpan.Zero;

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendControlViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendControlViewModel.cs
@@ -81,12 +81,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
Global = Locator.Current.GetService<Global>();
Wallet = wallet;
- RegisterValidationMethod(nameof(Address), ValidateActiveAddress);
- RegisterValidationMethod(nameof(UserFeeText), ValidateUserFeeText);
- RegisterValidationMethod(nameof(Password), ValidatePassword);
- RegisterValidationMethod(nameof(CustomChangeAddress), ValidateCustomChangeAddress);
-
-
LabelSuggestion = new SuggestLabelViewModel();
BuildTransactionButtonText = DoButtonText;
@@ -883,7 +877,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private void ValidatePassword(IErrorList errors) => PasswordHelper.ValidatePassword(errors, Password);
- private void ValidateActiveAddress(IErrorList errors)
+ private void ValidateAddress(IErrorList errors)
{
if (string.IsNullOrWhiteSpace(Address))
{

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoViewModel.cs
@@ -32,8 +32,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
Global = Locator.Current.GetService<Global>();
Wallet = wallet;
- RegisterValidationMethod(nameof(Password), ValidatePassword);
-
ClearSensitiveData(true);
ToggleSensitiveKeysCommand = ReactiveCommand.Create(() =>

MODIFY
WalletWasabi.Gui/Tabs/SettingsViewModel.cs
WalletWasabi.Gui/Tabs/SettingsViewModel.cs
@@ -45,13 +45,6 @@ namespace WalletWasabi.Gui.Tabs
{
Global = Locator.Current.GetService<Global>();
- RegisterValidationMethod(nameof(TorSocks5EndPoint), ValidateTorSocks5EndPoint);
- RegisterValidationMethod(nameof(BitcoinP2pEndPoint), ValidateBitcoinP2pEndPoint);
- RegisterValidationMethod(nameof(SomePrivacyLevel), ValidateSomePrivacyLevel);
- RegisterValidationMethod(nameof(FinePrivacyLevel), ValidateFinePrivacyLevel);
- RegisterValidationMethod(nameof(StrongPrivacyLevel), ValidateStrongPrivacyLevel);
- RegisterValidationMethod(nameof(DustThreshold), ValidateDustThreshold);
-
Autocopy = Global.UiConfig.Autocopy;
CustomFee = Global.UiConfig.IsCustomFee;
CustomChangeAddress = Global.UiConfig.IsCustomChangeAddress;
@@ -330,7 +323,7 @@ namespace WalletWasabi.Gui.Tabs
return;
}
- Validate();
+ DoValidation();
var isValid = !HasErrors;
if (!isValid)

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/GenerateWallets/GenerateWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/GenerateWallets/GenerateWalletViewModel.cs
@@ -23,8 +23,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.GenerateWallets
Global = Locator.Current.GetService<Global>();
Owner = owner;
- RegisterValidationMethod(nameof(Password), ValidatePassword);
-
NextCommand = ReactiveCommand.Create(DoNextCommand, this.WhenAnyValue(x => x.HasErrors).Select(x => !x));
NextCommand.ThrownExceptions

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWallets/LoadWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/LoadWallets/LoadWalletViewModel.cs
@@ -40,8 +40,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.LoadWallets
{
Global = Locator.Current.GetService<Global>();
- RegisterValidationMethod(nameof(Password), ValidatePassword);
-
Owner = owner;
Password = "";
LoadWalletType = loadWalletType;

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/RecoverWallets/RecoverWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/RecoverWallets/RecoverWalletViewModel.cs
@@ -45,8 +45,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.RecoverWallets
MnemonicWords = Guard.Correct(MnemonicWords);
Password = Guard.Correct(Password); // Do not let whitespaces to the beginning and to the end.
- RegisterValidationMethod(nameof(Password), ValidatePassword);
-
string walletFilePath = WalletManager.WalletDirectories.GetWalletFilePaths(WalletName).walletFilePath;
if (string.IsNullOrWhiteSpace(WalletName))

No need to register validation methods.