Update the About
MODIFY
WalletWasabi.Gui/Tabs/AboutViewModel.cs
WalletWasabi.Gui/Tabs/AboutViewModel.cs
@@ -12,13 +12,18 @@ using WalletWasabi.Helpers;
using WalletWasabi.Logging;
using System.Reactive.Linq;
using WalletWasabi.WebClients.Wasabi;
+using System.Reactive.Disposables;
namespace WalletWasabi.Gui.Tabs
{
internal class AboutViewModel : WasabiDocumentTabViewModel
{
+ private string _currentBackendMajorVersion;
+
public AboutViewModel() : base("About")
{
+ CurrentBackendMajorVersion = WasabiClient.CurrentBackendMajorVersion;
+
OpenBrowserCommand = ReactiveCommand.CreateFromTask<string>(IoHelpers.OpenBrowserAsync);
OpenBrowserCommand.ThrownExceptions
@@ -30,7 +35,13 @@ namespace WalletWasabi.Gui.Tabs
public Version ClientVersion => Constants.ClientVersion;
public string BackendCompatibleVersions => Constants.ClientSupportBackendVersionText;
- public string CurrentBackendMajorVersion => WasabiClient.CurrentBackendMajorVersion;
+
+ public string CurrentBackendMajorVersion
+ {
+ get => _currentBackendMajorVersion;
+ set => this.RaiseAndSetIfChanged(ref _currentBackendMajorVersion, value);
+ }
+
public Version BitcoinCoreVersion => Constants.BitcoinCoreVersion;
public Version HwiVersion => Constants.HwiVersion;
@@ -49,5 +60,24 @@ namespace WalletWasabi.Gui.Tabs
public string FAQLink => "https://docs.wasabiwallet.io/FAQ/";
public string DocsLink => "https://docs.wasabiwallet.io/";
+
+ public override void OnOpen(CompositeDisposable disposables)
+ {
+ base.OnOpen(disposables);
+
+ WasabiClient.CurrentBackendMajorVersionUpdated += WasabiClient_CurrentBackendMajorVersionUpdated;
+ }
+
+ public override bool OnClose()
+ {
+ WasabiClient.CurrentBackendMajorVersionUpdated -= WasabiClient_CurrentBackendMajorVersionUpdated;
+
+ return base.OnClose();
+ }
+
+ private void WasabiClient_CurrentBackendMajorVersionUpdated(object sender, string currentBackendMajorVersion)
+ {
+ CurrentBackendMajorVersion = currentBackendMajorVersion;
+ }
}
}

MODIFY
WalletWasabi/WebClients/Wasabi/WasabiClient.cs
WalletWasabi/WebClients/Wasabi/WasabiClient.cs
@@ -35,6 +35,8 @@ namespace WalletWasabi.WebClients.Wasabi
{
}
+ public static event EventHandler<string> CurrentBackendMajorVersionUpdated;
+
public static Dictionary<uint256, Transaction> TransactionCache { get; } = new Dictionary<uint256, Transaction>();
private static Queue<uint256> TransactionIdQueue { get; } = new Queue<uint256>();
public static object TransactionCacheLock { get; } = new object();
@@ -260,6 +262,7 @@ namespace WalletWasabi.WebClients.Wasabi
var clientUpToDate = Constants.ClientVersion >= versions.ClientVersion; // If the client version locally is greater than or equal to the backend's reported client version, then good.
var backendCompatible = int.Parse(Constants.ClientSupportBackendVersionMax) >= versions.BackendMajorVersion && versions.BackendMajorVersion >= int.Parse(Constants.ClientSupportBackendVersionMin); // If ClientSupportBackendVersionMin <= backend major <= ClientSupportBackendVersionMax, then our software is compatible.
CurrentBackendMajorVersion = versions.BackendMajorVersion.ToString();
+ CurrentBackendMajorVersionUpdated?.Invoke(this, CurrentBackendMajorVersion);
return new UpdateStatus(backendCompatible, clientUpToDate, versions.LegalDocumentsVersion);
}

Update the About