rename recoveryword model so that its a viewmodel.
MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/ConfirmRecoveryWordsViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/ConfirmRecoveryWordsViewModel.cs
@@ -16,14 +16,14 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
{
public class ConfirmRecoveryWordsViewModel : ViewModelBase, IRoutableViewModel
{
- private readonly ReadOnlyObservableCollection<RecoveryWord> _confirmationWords;
- private readonly SourceList<RecoveryWord> _confirmationWordsSourceList;
+ private readonly ReadOnlyObservableCollection<RecoveryWordViewModel> _confirmationWords;
+ private readonly SourceList<RecoveryWordViewModel> _confirmationWordsSourceList;
- public ConfirmRecoveryWordsViewModel(IScreen screen, List<RecoveryWord> mnemonicWords, KeyManager keyManager, WalletManager walletManager)
+ public ConfirmRecoveryWordsViewModel(IScreen screen, List<RecoveryWordViewModel> mnemonicWords, KeyManager keyManager, WalletManager walletManager)
{
HostScreen = screen;
- _confirmationWordsSourceList = new SourceList<RecoveryWord>();
+ _confirmationWordsSourceList = new SourceList<RecoveryWordViewModel>();
var finishCommandCanExecute =
_confirmationWordsSourceList
@@ -44,7 +44,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
.Connect()
.ObserveOn(RxApp.MainThreadScheduler)
.OnItemAdded(x => x.Reset())
- .Sort(SortExpressionComparer<RecoveryWord>.Ascending(x => x.Index))
+ .Sort(SortExpressionComparer<RecoveryWordViewModel>.Ascending(x => x.Index))
.Bind(out _confirmationWords)
.Subscribe();
@@ -54,11 +54,11 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
public string UrlPathSegment { get; } = "";
public IScreen HostScreen { get; }
- public ReadOnlyObservableCollection<RecoveryWord> ConfirmationWords => _confirmationWords;
+ public ReadOnlyObservableCollection<RecoveryWordViewModel> ConfirmationWords => _confirmationWords;
public ICommand FinishCommand { get; }
- private void SelectRandomConfirmationWords(List<RecoveryWord> mnemonicWords)
+ private void SelectRandomConfirmationWords(List<RecoveryWordViewModel> mnemonicWords)
{
var random = new Random();

MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/RecoveryWordsViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/RecoveryWordsViewModel.cs
@@ -17,11 +17,11 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
WalletManager walletManager)
: base(screen)
{
- MnemonicWords = new List<RecoveryWord>();
+ MnemonicWords = new List<RecoveryWordViewModel>();
for (int i = 0; i < mnemonic.Words.Length; i++)
{
- MnemonicWords.Add(new RecoveryWord(i + 1, mnemonic.Words[i]));
+ MnemonicWords.Add(new RecoveryWordViewModel(i + 1, mnemonic.Words[i]));
}
ContinueCommand = ReactiveCommand.Create(
@@ -31,6 +31,6 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
public ICommand ContinueCommand { get; }
- public List<RecoveryWord> MnemonicWords { get; set; }
+ public List<RecoveryWordViewModel> MnemonicWords { get; set; }
}
}
\ No newline at end of file

RENAME
WalletWasabi.Fluent/Models/RecoveryWord.cs
WalletWasabi.Fluent/ViewModels/RecoveryWordViewModel.cs
@@ -3,14 +3,14 @@ using WalletWasabi.Gui.Validation;
using WalletWasabi.Gui.ViewModels;
using WalletWasabi.Models;
-namespace WalletWasabi.Fluent.Models
+namespace WalletWasabi.Fluent.ViewModels
{
- public class RecoveryWord : ViewModelBase
+ public class RecoveryWordViewModel : ViewModelBase
{
private string _input;
private bool _isConfirmed;
- public RecoveryWord(int index, string word)
+ public RecoveryWordViewModel(int index, string word)
{
Index = index;
Word = word;

rename recoveryword model so that its a viewmodel.