override open command
MODIFY
WalletWasabi.Fluent/ViewModels/Login/LoginViewModel.cs
WalletWasabi.Fluent/ViewModels/Login/LoginViewModel.cs
@@ -11,7 +11,6 @@ namespace WalletWasabi.Fluent.ViewModels.Login
NextCommand = ReactiveCommand.Create(() =>
{
wallet.IsLoggedIn = true;
- wallet.OpenCommand
});
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/NavBar/NavBarViewModel.cs
WalletWasabi.Fluent/ViewModels/NavBar/NavBarViewModel.cs
@@ -44,17 +44,7 @@ namespace WalletWasabi.Fluent.ViewModels.NavBar
this.WhenAnyValue(x => x.SelectedItem)
.OfType<NavBarItemViewModel>()
- .Subscribe(x =>
- {
- if (x is WalletViewModelBase {IsLoggedIn: false} wallet)
- {
- x.Navigate().To(new LoginViewModel(wallet));
- }
- else
- {
- NavigateItem(x);
- }
- });
+ .Subscribe(NavigateItem);
this.WhenAnyValue(x => x.Items.Count)
.Subscribe(x =>

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModelBase.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModelBase.cs
@@ -3,6 +3,7 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Reactive.Disposables;
using System.Reactive.Linq;
+using WalletWasabi.Fluent.ViewModels.Login;
using WalletWasabi.Fluent.ViewModels.NavBar;
using WalletWasabi.Helpers;
using WalletWasabi.Wallets;
@@ -33,6 +34,19 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
.ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(x => WalletState = x.EventArgs)
.DisposeWith(_disposables);
+
+ OpenCommand = ReactiveCommand.Create(() =>
+ {
+ if (!IsLoggedIn)
+ {
+ Navigate().To(new LoginViewModel(this));
+ }
+ else
+ {
+ // TODO: wallet welcome page
+ Navigate().To(this);
+ }
+ });
}
public bool IsLoggedIn { get; set; }

override open command