Hide Coinjoin Settings when wallet is watch-only
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
@@ -159,11 +159,15 @@ public partial class WalletViewModel : WalletViewModelBase
WalletCoinsCommand = ReactiveCommand.Create(() => Navigate(NavigationTarget.DialogScreen).To(new WalletCoinsViewModel(this, balanceChanged)));
- CoinJoinSettingsCommand = ReactiveCommand.Create(() => Navigate(NavigationTarget.DialogScreen).To(new CoinJoinSettingsViewModel(this)));
+ CoinJoinSettingsCommand = ReactiveCommand.Create(() => Navigate(NavigationTarget.DialogScreen).To(new CoinJoinSettingsViewModel(this)), Observable.Return(!wallet.KeyManager.IsWatchOnly));
CoinJoinStateViewModel = new CoinJoinStateViewModel(this, balanceChanged);
+
+ IsWatchOnly = wallet.KeyManager.IsWatchOnly;
}
+ public bool IsWatchOnly { get; }
+
public IObservable<bool> IsMusicBoxVisible { get; }
internal CoinJoinStateViewModel CoinJoinStateViewModel { get; }
@@ -184,7 +188,7 @@ public partial class WalletViewModel : WalletViewModelBase
public ICommand WalletCoinsCommand { get; }
- public ICommand CoinJoinSettingsCommand { get; }
+ public ReactiveCommand<Unit, Unit> CoinJoinSettingsCommand { get; }
private CompositeDisposable Disposables { get; }

MODIFY
WalletWasabi.Fluent/Views/Wallets/WalletView.axaml
WalletWasabi.Fluent/Views/Wallets/WalletView.axaml
<PathIcon Data="{StaticResource stats_wallet_regular}" />
</MenuItem.Icon>
</MenuItem>
- <MenuItem Header="Coinjoin Settings" Command="{Binding CoinJoinSettingsCommand}">
+ <MenuItem Header="Coinjoin Settings" Command="{Binding CoinJoinSettingsCommand}" IsVisible="{Binding !IsWatchOnly}">
<MenuItem.Icon>
<PathIcon Data="{StaticResource stats_wallet_regular}" />
</MenuItem.Icon>

Hide Coinjoin Settings when wallet is watch-only