Add DOwnloadNewVersion property & update
MODIFY
WalletWasabi.Fluent.Desktop/Program.cs
WalletWasabi.Fluent.Desktop/Program.cs
@@ -145,7 +145,7 @@ public class Program
Logger.LogSoftwareStopped("Wasabi");
- if (Services.UpdateManager.UpdateOnClose)
+ if (Services.UpdateManager.DoUpdateOnClose)
{
bool installed = Services.UpdateManager.InstallNewVersion();
if (installed)

MODIFY
WalletWasabi.Fluent/Config.cs
WalletWasabi.Fluent/Config.cs
@@ -69,6 +69,10 @@ public class Config : ConfigBase
[JsonProperty(PropertyName = "TerminateTorOnExit", DefaultValueHandling = DefaultValueHandling.Populate)]
public bool TerminateTorOnExit { get; internal set; } = false;
+ [DefaultValue(true)]
+ [JsonProperty(PropertyName = "DownloadNewVersion", DefaultValueHandling = DefaultValueHandling.Populate)]
+ public bool DownloadNewVersion { get; internal set; } = true;
+
[DefaultValue(false)]
[JsonProperty(PropertyName = "StartLocalBitcoinCoreOnStartup", DefaultValueHandling = DefaultValueHandling.Populate)]
public bool StartLocalBitcoinCoreOnStartup { get; internal set; } = false;

MODIFY
WalletWasabi.Fluent/Global.cs
WalletWasabi.Fluent/Global.cs
@@ -103,7 +103,7 @@ public class Global
Synchronizer = new WasabiSynchronizer(BitcoinStore, HttpClientFactory);
LegalChecker = new(DataDir);
- UpdateManager = new(DataDir, HttpClientFactory.NewHttpClient(Mode.DefaultCircuit));
+ UpdateManager = new(DataDir, Config.DownloadNewVersion, HttpClientFactory.NewHttpClient(Mode.DefaultCircuit));
TransactionBroadcaster = new TransactionBroadcaster(Network, BitcoinStore, HttpClientFactory, WalletManager);
TorStatusChecker = new TorStatusChecker(TimeSpan.FromHours(6), HttpClientFactory.NewHttpClient(Mode.DefaultCircuit), new XmlIssueListParser());

MODIFY
WalletWasabi.Fluent/ViewModels/Settings/GeneralSettingsTabViewModel.cs
WalletWasabi.Fluent/ViewModels/Settings/GeneralSettingsTabViewModel.cs
@@ -31,6 +31,7 @@ public partial class GeneralSettingsTabViewModel : SettingsTabViewModelBase
[AutoNotify] private bool _hideOnClose;
[AutoNotify] private bool _useTor;
[AutoNotify] private bool _terminateTorOnExit;
+ [AutoNotify] private bool _downloadNewVersion;
public GeneralSettingsTabViewModel()
{
@@ -45,6 +46,7 @@ public partial class GeneralSettingsTabViewModel : SettingsTabViewModelBase
: FeeDisplayUnit.Satoshis;
_useTor = Services.Config.UseTor;
_terminateTorOnExit = Services.Config.TerminateTorOnExit;
+ _downloadNewVersion = Services.Config.DownloadNewVersion;
this.WhenAnyValue(x => x.DarkModeEnabled)
.Skip(1)
@@ -97,7 +99,8 @@ public partial class GeneralSettingsTabViewModel : SettingsTabViewModelBase
this.WhenAnyValue(
x => x.UseTor,
- x => x.TerminateTorOnExit)
+ x => x.TerminateTorOnExit,
+ x => x.DownloadNewVersion)
.ObserveOn(RxApp.TaskpoolScheduler)
.Throttle(TimeSpan.FromMilliseconds(ThrottleTime))
.Skip(1)
@@ -113,5 +116,6 @@ public partial class GeneralSettingsTabViewModel : SettingsTabViewModelBase
{
config.UseTor = UseTor;
config.TerminateTorOnExit = TerminateTorOnExit;
+ config.DownloadNewVersion = DownloadNewVersion;
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/StatusIcon/StatusIconViewModel.cs
WalletWasabi.Fluent/ViewModels/StatusIcon/StatusIconViewModel.cs
@@ -41,13 +41,12 @@ public partial class StatusIconViewModel : IStatusIconViewModel, IDisposable
ManualUpdateCommand = ReactiveCommand.CreateFromTask(() => IoHelpers.OpenBrowserAsync("https://wasabiwallet.io/#download"));
UpdateCommand = ReactiveCommand.Create(() =>
{
- Services.UpdateManager.UpdateOnClose = true;
+ Services.UpdateManager.DoUpdateOnClose = true;
UpdateAvailable = false;
});
AskMeLaterCommand = ReactiveCommand.Create(() =>
{
- Services.UpdateManager.UpdateOnClose = false;
UpdateAvailable = false;
});

MODIFY
WalletWasabi.Fluent/Views/Settings/GeneralSettingsTabView.axaml
WalletWasabi.Fluent/Views/Settings/GeneralSettingsTabView.axaml
<ToggleSwitch IsChecked="{Binding TerminateTorOnExit}" />
</DockPanel>
+ <DockPanel>
+ <TextBlock Text="Auto download new version" />
+ <ToggleSwitch IsChecked="{Binding DownloadNewVersion}" />
+ </DockPanel>
+
<StackPanel Spacing="10">
<TextBlock Text="Fee display unit" />
<ComboBox HorizontalAlignment="Stretch" Items="{Binding FeeDisplayUnits}" SelectedItem="{Binding SelectedFeeDisplayUnit}">
</ComboBox.ItemTemplate>
</ComboBox>
</StackPanel>
-
</StackPanel>
</UserControl>

Add DOwnloadNewVersion property & update