Add Tor is turned off status
MODIFY
WalletWasabi.Gui/Converters/StatusColorConverter.cs
WalletWasabi.Gui/Converters/StatusColorConverter.cs
@@ -15,7 +15,7 @@ namespace WalletWasabi.Gui.Converters
{
switch (parameter?.ToString())
{
- case "Tor" when Enum.Parse<TorStatus>(value.ToString()) == TorStatus.NotRunning:
+ case "Tor" when Enum.Parse<TorStatus>(value.ToString()) != TorStatus.Running:
case "Backend" when Enum.Parse<BackendStatus>(value.ToString()) == BackendStatus.NotConnected:
case "Peers" when (int)value == 0:
case "FiltersLeft" when value.ToString() != "0": // need to cover "--"

MODIFY
WalletWasabi.Gui/ViewModels/StatusBarViewModel.cs
WalletWasabi.Gui/ViewModels/StatusBarViewModel.cs
@@ -31,6 +31,8 @@ namespace WalletWasabi.Gui.ViewModels
private NodesCollection Nodes { get; }
private WasabiSynchronizer Synchronizer { get; }
+ private bool UseTor { get; }
+
private UpdateStatus _updateStatus;
private bool _updateAvailable;
private bool _criticalUpdateAvailable;
@@ -49,6 +51,7 @@ namespace WalletWasabi.Gui.ViewModels
Synchronizer = synchronizer;
BlocksLeft = 0;
FiltersLeft = synchronizer.GetFiltersLeft();
+ UseTor = Global.Config.UseTor.Value; // Don't make it dynamic, because if you change this config settings only next time will it activate.
Observable.FromEventPattern<NodeEventArgs>(nodes, nameof(nodes.Added))
.Subscribe(x =>
@@ -316,7 +319,7 @@ namespace WalletWasabi.Gui.ViewModels
{
Status = "New Version Is Available";
}
- else if (Tor != TorStatus.Running || Backend != BackendStatus.Connected || Peers < 1)
+ else if (Tor == TorStatus.NotRunning || Backend != BackendStatus.Connected || Peers < 1)
{
Status = "Connecting...";
}
@@ -340,13 +343,13 @@ namespace WalletWasabi.Gui.ViewModels
private void SetPeers(int peers)
{
// Set peers to 0 if Tor is not running, because we get Tor status from backend answer so it's seem to the user that peers are connected over clearnet, while they don't.
- Peers = Tor == TorStatus.Running ? peers : 0;
+ Peers = Tor == TorStatus.NotRunning ? 0 : peers;
}
private void SetTor(TorStatus tor)
{
// Set peers to 0 if Tor is not running, because we get Tor status from backend answer so it's seem to the user that peers are connected over clearnet, while they don't.
- Tor = tor;
+ Tor = UseTor ? tor : TorStatus.TurnedOff;
}
#region IDisposable Support

MODIFY
WalletWasabi/Models/TorStatus.cs
WalletWasabi/Models/TorStatus.cs
public enum TorStatus
{
NotRunning,
+ TurnedOff,
Running
}
}

Add Tor is turned off status