Enter password basics
ADD
WalletWasabi.Fluent/AddWallet/Common/EnterPasswordView.axaml.cs
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+using Avalonia.ReactiveUI;
+
+namespace WalletWasabi.Fluent.AddWallet.Common
+{
+ public class EnterPasswordView : ReactiveUserControl<EnterPasswordViewModel>
+ {
+ public EnterPasswordView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+ }
+}

ADD
WalletWasabi.Fluent/AddWallet/Common/EnterPasswordViewModel.cs
+using ReactiveUI;
+using System;
+using WalletWasabi.Blockchain.Keys;
+using WalletWasabi.Gui;
+using WalletWasabi.Gui.ViewModels;
+
+namespace WalletWasabi.Fluent.AddWallet.Common
+{
+ public class EnterPasswordViewModel : ViewModelBase, IRoutableViewModel
+ {
+ public EnterPasswordViewModel(IScreen screen, Global global)
+ {
+ var walletGenerator = new WalletGenerator(global.WalletManager.WalletDirectories.WalletsDir, global.Network);
+ walletGenerator.TipHeight = global.BitcoinStore.SmartHeaderChain.TipHeight;
+
+ var (km, mnemonic) = walletGenerator.GenerateWallet("TestWallet", "12345");
+ }
+
+ public string? UrlPathSegment => throw new NotImplementedException();
+ public IScreen HostScreen => throw new NotImplementedException();
+ }
+}

RENAME
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/ConfirmRecoveryWordsView.axaml
WalletWasabi.Fluent/AddWallet/CreateWallet/ConfirmRecoveryWordsView.axaml
RENAME
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/ConfirmRecoveryWordsView.axaml.cs
WalletWasabi.Fluent/AddWallet/CreateWallet/ConfirmRecoveryWordsView.axaml.cs
using Avalonia.Markup.Xaml;
using Avalonia.ReactiveUI;
-using WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet;
-namespace WalletWasabi.Fluent.Views.Dialogs.CreateWallet
+namespace WalletWasabi.Fluent.AddWallet.CreateWallet
{
public class ConfirmRecoveryWordsView : ReactiveUserControl<ConfirmRecoveryWordsViewModel>
{

RENAME
WalletWasabi.Fluent/ViewModels/Dialogs/CreateWallet/ConfirmRecoveryWordsViewModel.cs
WalletWasabi.Fluent/AddWallet/CreateWallet/ConfirmRecoveryWordsViewModel.cs
@@ -10,10 +10,11 @@ using System.Reactive.Linq;
using System.Windows.Input;
using WalletWasabi.Blockchain.Keys;
using WalletWasabi.Fluent.Models;
+using WalletWasabi.Fluent.ViewModels;
using WalletWasabi.Gui;
using WalletWasabi.Gui.ViewModels;
-namespace WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet
+namespace WalletWasabi.Fluent.AddWallet.CreateWallet
{
public class ConfirmRecoveryWordsViewModel : ViewModelBase, IDisposable, IRoutableViewModel
{

RENAME
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/RecoveryWordsView.axaml
WalletWasabi.Fluent/AddWallet/CreateWallet/RecoveryWordsView.axaml
mc:Ignorable="d"
d:DesignWidth="600" d:DesignHeight="500"
Width="600" Height="500"
- x:Class="WalletWasabi.Fluent.Views.Dialogs.CreateWallet.RecoveryWordsView">
+ x:Class="WalletWasabi.Fluent.AddWallet.CreateWallet.RecoveryWordsView">
<Panel>
<Button Classes="invisible" Margin="25 35 0 0" Command="{Binding GoBackCommand}" HorizontalAlignment="Left" VerticalAlignment="Top">

RENAME
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/RecoveryWordsView.axaml.cs
WalletWasabi.Fluent/AddWallet/CreateWallet/RecoveryWordsView.axaml.cs
using Avalonia.Markup.Xaml;
using Avalonia.ReactiveUI;
-using WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet;
-namespace WalletWasabi.Fluent.Views.Dialogs.CreateWallet
+namespace WalletWasabi.Fluent.AddWallet.CreateWallet
{
public class RecoveryWordsView : ReactiveUserControl<RecoveryWordsViewModel>
{

RENAME
WalletWasabi.Fluent/ViewModels/Dialogs/CreateWallet/RecoveryWordsViewModel.cs
WalletWasabi.Fluent/AddWallet/CreateWallet/RecoveryWordsViewModel.cs
@@ -7,10 +7,11 @@ using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.Keys;
using WalletWasabi.Fluent.Models;
+using WalletWasabi.Fluent.ViewModels;
using WalletWasabi.Gui;
using WalletWasabi.Gui.ViewModels;
-namespace WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet
+namespace WalletWasabi.Fluent.AddWallet.CreateWallet
{
public class RecoveryWordsViewModel : ViewModelBase, IRoutableViewModel
{

MODIFY
WalletWasabi.Fluent/ViewModels/SettingsPageViewModel.cs
WalletWasabi.Fluent/ViewModels/SettingsPageViewModel.cs
@@ -8,10 +8,11 @@ using WalletWasabi.Gui.Validation;
using WalletWasabi.Models;
using Avalonia;
using Avalonia.Markup.Xaml.Styling;
-using WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet;
using WalletWasabi.Blockchain.Keys;
using WalletWasabi.Gui;
using Splat;
+using WalletWasabi.Fluent.AddWallet.CreateWallet;
+using WalletWasabi.Fluent.AddWallet.Common;
namespace WalletWasabi.Fluent.ViewModels
{
@@ -28,11 +29,7 @@ namespace WalletWasabi.Fluent.ViewModels
{
var global = Locator.Current.GetService<Global>();
- var walletGenerator = new WalletGenerator(global.WalletManager.WalletDirectories.WalletsDir, global.Network);
- walletGenerator.TipHeight = global.BitcoinStore.SmartHeaderChain.TipHeight;
- var (km, mnemonic) = walletGenerator.GenerateWallet("TestWallet", "12345");
-
- screen.Router.Navigate.Execute(new RecoveryWordsViewModel(screen, km, mnemonic, global));
+ screen.Router.Navigate.Execute(new EnterPasswordViewModel(screen, global));
});
OpenDialogCommand = ReactiveCommand.CreateFromTask(async () => await ConfirmSetting.Handle("Please confirm the setting:").ToTask());

Enter password basics