logic implemented
MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/LegalDocumentsViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/LegalDocumentsViewModel.cs
@@ -31,7 +31,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
.Subscribe(content => IsBusy = content is null);
}
- private LegalChecker LegalChecker { get; }
+ public LegalChecker LegalChecker { get; }
protected override void OnNavigatedTo(bool inStack, CompositeDisposable disposables)
{

MODIFY
WalletWasabi.Fluent/ViewModels/Login/LoginViewModel.cs
WalletWasabi.Fluent/ViewModels/Login/LoginViewModel.cs
@@ -52,7 +52,6 @@ namespace WalletWasabi.Fluent.ViewModels.Login
wallet.Login();
walletViewModelBase.RaisePropertyChanged(nameof(WalletViewModelBase.IsLoggedIn));
- // TODO: navigate to the wallet welcome page
Navigate().To(walletViewModelBase, NavigationMode.Clear);
}
});
@@ -74,5 +73,9 @@ namespace WalletWasabi.Fluent.ViewModels.Login
public ICommand ForgotPasswordCommand { get; }
public KeyManager KeyManager { get; }
+
+ private async Task ShowLegalDocs()
+ {
+ }
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/ClosedWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/ClosedWalletViewModel.cs
@@ -2,7 +2,9 @@ using System;
using System.Collections.ObjectModel;
using System.Reactive.Disposables;
using System.Threading.Tasks;
+using WalletWasabi.Fluent.ViewModels.AddWallet;
using WalletWasabi.Fluent.ViewModels.NavBar;
+using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.Fluent.ViewModels.Wallets.HardwareWallet;
using WalletWasabi.Fluent.ViewModels.Wallets.WatchOnlyWallet;
using WalletWasabi.Logging;
@@ -33,10 +35,35 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
if (Wallet.State == WalletState.Uninitialized)
{
AbandonedTasks abandonedTasks = new();
- abandonedTasks.AddAndClearCompleted(LoadWallet());
+ abandonedTasks.AddAndClearCompleted(ShowLegalOrLoad());
}
}
+ private async Task ShowLegalOrLoad()
+ {
+ var legalShowed = await CheckLegal();
+
+ if (!legalShowed)
+ {
+ await LoadWallet();
+ }
+ }
+
+ private async Task<bool> CheckLegal()
+ {
+ var legalChecker = (await NavigationManager.MaterialiseViewModel(LegalDocumentsViewModel.MetaData) as LegalDocumentsViewModel)?.LegalChecker;
+
+ if (legalChecker is { } lc && lc.TryGetNewLegalDocs(out _))
+ {
+ var legalDocs = new TermsAndConditionsViewModel(legalChecker, this);
+ Navigate().To(legalDocs);
+
+ return true;
+ }
+
+ return false;
+ }
+
private async Task LoadWallet()
{
try

logic implemented