Hide if watchonly
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletSettingsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletSettingsViewModel.cs
@@ -17,6 +17,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
_preferPsbtWorkflow = wallet.KeyManager.PreferPsbtWorkflow;
_autoCoinJoin = wallet.KeyManager.AutoCoinJoin;
IsHardwareWallet = wallet.KeyManager.IsHardwareWallet;
+ IsWatchOnly = wallet.KeyManager.IsWatchOnly;
SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
@@ -42,6 +43,8 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
public bool IsHardwareWallet { get; }
+ public bool IsWatchOnly { get; }
+
public sealed override string Title { get; protected set; }
}
}

MODIFY
WalletWasabi.Fluent/Views/Wallets/WalletSettingsView.axaml
WalletWasabi.Fluent/Views/Wallets/WalletSettingsView.axaml
<ToggleSwitch IsChecked="{Binding PreferPsbtWorkflow}" />
</DockPanel>
- <DockPanel>
+ <DockPanel IsVisible="{Binding !IsWatchOnly}">
<TextBlock Text="Auto CoinJoin" />
<ToggleSwitch IsChecked="{Binding AutoCoinJoin}" />
</DockPanel>

MODIFY
WalletWasabi/Blockchain/Keys/KeyManager.cs
WalletWasabi/Blockchain/Keys/KeyManager.cs
@@ -2,7 +2,6 @@ using NBitcoin;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
@@ -129,7 +128,6 @@ namespace WalletWasabi.Blockchain.Keys
[JsonProperty(Order = 11, PropertyName = "PreferPsbtWorkflow")]
public bool PreferPsbtWorkflow { get; set; }
- [DefaultValue(true)]
[JsonProperty(Order = 12, PropertyName = "AutoCoinJoin", DefaultValueHandling = DefaultValueHandling.Populate)]
public bool AutoCoinJoin { get; set; }

Hide if watchonly