Add IsEmptyWallet property
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
@@ -39,6 +39,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
[AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isNormalLayout;
[AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isWideLayout;
[AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isWalletBalanceZero;
+ [AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isEmptyWallet;
protected WalletViewModel(Wallet wallet) : base(wallet)
{
@@ -58,11 +59,14 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
.Throttle(TimeSpan.FromSeconds(0.1))
.ObserveOn(RxApp.MainThreadScheduler);
+ History = new HistoryViewModel(this, balanceChanged);
+
balanceChanged
.Subscribe(_ => IsWalletBalanceZero = wallet.Coins.TotalAmount() == Money.Zero)
.DisposeWith(Disposables);
- History = new HistoryViewModel(this, balanceChanged);
+ this.WhenAnyValue(x => x.IsWalletBalanceZero, x => x.History.IsTransactionHistoryEmpty)
+ .Subscribe(tuple => IsEmptyWallet = tuple.Item1 && tuple.Item2);
_smallLayoutHeightBreakpoint = 650;
_wideLayoutWidthBreakpoint = 1400;

MODIFY
WalletWasabi.Fluent/Views/Wallets/WalletView.axaml
WalletWasabi.Fluent/Views/Wallets/WalletView.axaml
</StackPanel>
</Button>
<Button Classes="function"
- IsVisible="{Binding !IsWalletBalanceZero}"
+ IsVisible="{Binding !IsEmptyWallet}"
Command="{Binding ReceiveCommand}">
<StackPanel Orientation="Horizontal" Spacing="15">
<PathIcon Data="{StaticResource wallet_action_receive}" />
<Panel Classes.smallLayout="{Binding IsSmallLayout}"
Classes.normalLayout="{Binding IsNormalLayout}"
Classes.wideLayout="{Binding IsWideLayout}"
- Classes.isEmptyWallet="{Binding IsWalletBalanceZero}">
+ Classes.isEmptyWallet="{Binding IsEmptyWallet}">
<Panel.Styles>
<Style Selector="Panel.smallLayout">
<Setter Property="HorizontalAlignment" Value="Left"/>
</Style>
</Panel.Styles>
<ScrollViewer Name="ScrollViewer"
- IsVisible="{Binding !IsWalletBalanceZero}"
+ IsVisible="{Binding !IsEmptyWallet}"
Classes.smallLayout="{Binding IsSmallLayout}"
Classes.normalLayout="{Binding IsNormalLayout}"
Classes.wideLayout="{Binding IsWideLayout}">
Margin="6"
Padding="16"
BoxShadow="{DynamicResource InfoBoxShadow}"
- IsVisible="{Binding IsWalletBalanceZero}">
+ IsVisible="{Binding IsEmptyWallet}">
<StackPanel>
<Label Content="Since this is a empty wallet, there isn't a lot going on here. Click an option below to receive Bitcoin."
Classes="wrap center"

Add IsEmptyWallet property