always show newest available legal doc from action center.
MODIFY
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
@@ -198,12 +198,19 @@ namespace WalletWasabi.Fluent.ViewModels
RxApp.MainThreadScheduler.Schedule(async () =>
{
- while (_legalChecker.CurrentLegalDocument is null)
+ LegalDocuments? document;
+
+ while (true)
+ {
+ document = _legalChecker.GetLatestDocument();
+
+ if (document is { })
{
- await Task.Delay(TimeSpan.FromSeconds(5));
+ break;
+ }
}
- LegalDocumentsViewModel.RegisterLazy(() => new LegalDocumentsViewModel(_legalChecker.CurrentLegalDocument.Content));
+ LegalDocumentsViewModel.RegisterLazy(() => new LegalDocumentsViewModel(document.Content));
_searchPage.RegisterSearchEntry(LegalDocumentsViewModel.MetaData);
});

MODIFY
WalletWasabi/Services/LegalChecker.cs
WalletWasabi/Services/LegalChecker.cs
@@ -44,6 +44,20 @@ namespace WalletWasabi.Services
ProvisionalLegalDocument = await LegalDocuments.LoadAgreedAsync(ProvisionalLegalFolder).ConfigureAwait(false);
}
+ public LegalDocuments? GetLatestDocument()
+ {
+ if (ProvisionalLegalDocument is { })
+ {
+ return ProvisionalLegalDocument;
+ }
+ if (CurrentLegalDocument is { })
+ {
+ return CurrentLegalDocument;
+ }
+
+ return null;
+ }
+
public bool TryGetNewLegalDocs([NotNullWhen(true)] out LegalDocuments? legalDocuments)
{
legalDocuments = null;

always show newest available legal doc from action center.