fix exception on startup
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
@@ -42,7 +42,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public ReactiveCommand SelectNonPrivateCheckBoxCommand { get; }
public ReactiveCommand SortCommand { get; }
- public event Action DequeueCoinsPressed;
+ public event EventHandler DequeueCoinsPressed;
public event EventHandler<CoinViewModel> SelectionChanged;
@@ -183,6 +183,9 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
RemovedCoinViewModels = new List<CoinViewModel>();
+ AmountSortDirection = SortOrder.Decreasing;
+ RefreshOrdering();
+
var sortChanged = this.WhenValueChanged(@this => MyComparer).Select(_ => MyComparer);
RootList = new SourceList<CoinViewModel>();
@@ -195,9 +198,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
SortCommand = ReactiveCommand.Create(() => RefreshOrdering());
- AmountSortDirection = SortOrder.Decreasing;
- RefreshOrdering();
-
RootList = new SourceList<CoinViewModel>();
this.WhenAnyValue(x => x.AmountSortDirection).Subscribe(x =>
@@ -249,7 +249,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
DequeueCoin = ReactiveCommand.Create(() =>
{
if (SelectedCoin is null) return;
- DequeueCoinsPressed?.Invoke();
+ DequeueCoinsPressed?.Invoke(this, EventArgs.Empty);
}, this.WhenAnyValue(x => x.CanDeqeue));
SelectAllCheckBoxCommand = ReactiveCommand.Create(() =>

fix exception on startup