Hide CoinJoin tab if watch only wallet
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <StackPanel IsVisible="{Binding IsWatchOnly}" Grid.Column="0" Spacing="8">
- <StackPanel IsVisible="{Binding IsHardwareWallet}" VerticalAlignment="Center">
- <TextBlock Text="Hardware wallets cannot coinjoin :(" />
- </StackPanel>
- </StackPanel>
- <StackPanel IsVisible="{Binding !IsWatchOnly}" Grid.Column="0" Spacing="10">
+ <StackPanel Grid.Column="0" Spacing="10">
<controls:TogglePasswordBox Text="{Binding Password}" Margin="0 20 0 0" MinWidth="200">
<i:Interaction.Behaviors>
<behaviors:CommandOnEnterBehavior Command="{Binding EnqueueCommand}" />

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletViewModel.cs
@@ -57,7 +57,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
ReceiveTab = new ReceiveTabViewModel(Wallet);
- CoinjoinTab = new CoinJoinTabViewModel(Wallet);
HistoryTab = new HistoryTabViewModel(Wallet);
var advancedAction = new WalletAdvancedViewModel();
@@ -65,7 +64,14 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
BuildTab = new BuildTabViewModel(Wallet);
Actions.Add(ReceiveTab);
+
+ // If not watch only wallet (not hww) then we need the CoinJoin tab.
+ if (!Wallet.KeyManager.IsWatchOnly)
+ {
+ CoinjoinTab = new CoinJoinTabViewModel(Wallet);
Actions.Add(CoinjoinTab);
+ }
+
Actions.Add(HistoryTab);
Actions.Add(advancedAction);
@@ -107,7 +113,12 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
shell.AddOrSelectDocument(ReceiveTab);
+
+ if (CoinjoinTab is { })
+ {
shell.AddOrSelectDocument(CoinjoinTab);
+ }
+
shell.AddOrSelectDocument(HistoryTab);
SelectTab(shell);

Hide CoinJoin tab if watch only wallet