Hide Send button for watch only wallets
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
@@ -39,6 +39,7 @@ public partial class WalletViewModel : WalletViewModelBase
[AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isWideLayout;
[AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isWalletBalanceZero;
[AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isEmptyWallet;
+ [AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isSendVisible;
protected WalletViewModel(Wallet wallet) : base(wallet)
{
@@ -111,6 +112,9 @@ public partial class WalletViewModel : WalletViewModelBase
this.WhenAnyValue(x => x.HeightSource)
.Subscribe(x => LayoutSelector(_widthSource, x));
+ this.WhenAnyValue(x => x.IsWalletBalanceZero)
+ .Subscribe(_ => IsSendVisible = !wallet.KeyManager.IsWatchOnly && !IsWalletBalanceZero);
+
SendCommand = ReactiveCommand.Create(() => Navigate(NavigationTarget.DialogScreen).To(new SendViewModel(wallet)));
ReceiveCommand = ReactiveCommand.Create(() => Navigate(NavigationTarget.DialogScreen).To(new ReceiveViewModel(wallet)));

MODIFY
WalletWasabi.Fluent/Views/Wallets/WalletView.axaml
WalletWasabi.Fluent/Views/Wallets/WalletView.axaml
<Button.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="PreferPsbtWorkflow" />
- <Binding Path="IsWalletBalanceZero" Converter="{x:Static BoolConverters.Not}" />
</MultiBinding>
</Button.IsVisible>
<StackPanel Orientation="Horizontal" Spacing="15">
</StackPanel>
</Button>
<Button Classes="function"
- IsVisible="{Binding !IsWalletBalanceZero}"
+ IsVisible="{Binding IsSendVisible}"
Command="{Binding SendCommand}">
<StackPanel Orientation="Horizontal" Spacing="15">
<PathIcon Data="{StaticResource wallet_action_send}" />

Hide Send button for watch only wallets