Display the sum of selected coins' amount
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/CoinListView.xaml
<CheckBox Content = "Select All" IsThreeState="True" IsChecked = "{Binding SelectAllCheckBoxState}" Command="{Binding SelectAllCheckBoxCommand}" />
<CheckBox Content = "Select All Private" IsThreeState="True" IsChecked = "{Binding SelectPrivateCheckBoxState}" Command="{Binding SelectPrivateCheckBoxCommand}" ToolTip.Tip="Coins those acquired the strongest privacy shield." />
<CheckBox Content = "Select All Non-Private" IsThreeState="True" IsChecked = "{Binding SelectNonPrivateCheckBoxState}" Command="{Binding SelectNonPrivateCheckBoxCommand}" ToolTip.Tip="Coins those do not have the strongest privacy shield." />
+ <TextBlock Text = "|" />
+ <TextBlock Text = "Selected Amount:" />
+ <TextBlock Text = "{Binding TotalAmount}" />
+ <TextBlock Text = "BTC" />
</StackPanel>
<ListBox Items="{Binding Coins}" VirtualizationMode="None" SelectedItem="{Binding Path=SelectedCoin, Mode=TwoWay}">
<ListBox.ContextMenu>

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
@@ -35,6 +35,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private bool? _selectNonPrivateCheckBoxState;
private GridLength _coinJoinStatusWidth;
private SortOrder _clustersSortDirection;
+ private decimal _totalAmount;
public ReactiveCommand<Unit, Unit> EnqueueCoin { get; }
public ReactiveCommand<Unit, Unit> DequeueCoin { get; }
@@ -103,6 +104,15 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
set => this.RaiseAndSetIfChanged(ref _clustersSortDirection, value);
}
+ public decimal TotalAmount
+ {
+ get => _totalAmount;
+ set
+ {
+ this.RaiseAndSetIfChanged(ref _totalAmount, value);
+ }
+ }
+
private void RefreshOrdering()
{
if (AmountSortDirection != SortOrder.None)
@@ -447,6 +457,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
SetSelections();
SelectionChanged?.Invoke(this, cvm);
+ TotalAmount = Coins.Where(x=>x.IsSelected).Sum(x=>x.Amount.ToDecimal(NBitcoin.MoneyUnit.BTC));
}
public void OnCoinStatusChanged()

Display the sum of selected coins' amount