canExecute variables
MODIFY
WalletWasabi.Fluent/AddWallet/Common/EnterPasswordViewModel.cs
WalletWasabi.Fluent/AddWallet/Common/EnterPasswordViewModel.cs
@@ -28,20 +28,20 @@ namespace WalletWasabi.Fluent.AddWallet.Common
this.ValidateProperty(x => x.Password, ValidatePassword);
this.ValidateProperty(x => x.ConfirmPassword, ValidateConfirmPassword);
+ var continueCommandCanExecute =
+ this.WhenAnyValue(x => x.Password, x => x.ConfirmPassword, (password, confirmPassword) =>
+ !string.IsNullOrEmpty(password) &&
+ !string.IsNullOrEmpty(confirmPassword) &&
+ !Validations.Any)
+ .ObserveOn(RxApp.MainThreadScheduler);
+
ContinueCommand = ReactiveCommand.Create(() =>
{
var walletGenerator = new WalletGenerator(global.WalletManager.WalletDirectories.WalletsDir, global.Network);
walletGenerator.TipHeight = global.BitcoinStore.SmartHeaderChain.TipHeight;
var (km, mnemonic) = walletGenerator.GenerateWallet(walletName, Password);
screen.Router.Navigate.Execute(new RecoveryWordsViewModel(screen, km, mnemonic, global));
- },
- // Can Execute
- this.WhenAnyValue(x => x.Password, x => x.ConfirmPassword, (password, confirmPassword) =>
- !string.IsNullOrEmpty(password) &&
- !string.IsNullOrEmpty(confirmPassword) &&
- !Validations.Any)
- .ObserveOn(RxApp.MainThreadScheduler)
- );
+ }, continueCommandCanExecute);
this.WhenAnyValue(x => x.Password)
.ObserveOn(RxApp.MainThreadScheduler)

MODIFY
WalletWasabi.Fluent/AddWallet/CreateWallet/ConfirmRecoveryWordsViewModel.cs
WalletWasabi.Fluent/AddWallet/CreateWallet/ConfirmRecoveryWordsViewModel.cs
@@ -25,17 +25,18 @@ namespace WalletWasabi.Fluent.AddWallet.CreateWallet
_confirmationWordsSourceList = new SourceList<RecoveryWord>();
- FinishCommand = ReactiveCommand.Create(
- () =>
- {
- global.WalletManager.AddWallet(keyManager);
- screen.Router.NavigationStack.Clear();
- },
+ var finishCommandCanExecute =
_confirmationWordsSourceList
.Connect()
.ObserveOn(RxApp.MainThreadScheduler)
.WhenValueChanged(x => x.IsConfirmed)
- .Select(x => !_confirmationWordsSourceList.Items.Any(x => !x.IsConfirmed)));
+ .Select(x => !_confirmationWordsSourceList.Items.Any(x => !x.IsConfirmed));
+
+ FinishCommand = ReactiveCommand.Create(() =>
+ {
+ global.WalletManager.AddWallet(keyManager);
+ screen.Router.NavigationStack.Clear();
+ }, finishCommandCanExecute);
_confirmationWordsSourceList
.Connect()

canExecute variables