Skip to content

Commit

Permalink
- Fixing the Amount ordering at history tab
Browse files Browse the repository at this point in the history
  • Loading branch information
molnard committed Dec 15, 2018
1 parent 3d43b82 commit 52a556a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,11 @@ private void RefreshOrdering()
switch (AmountSortDirection)
{
case SortOrder.Increasing:
Transactions = new ObservableCollection<TransactionViewModel>(_transactions.OrderBy(t => t.AmountBtc));
Transactions = new ObservableCollection<TransactionViewModel>(_transactions.OrderBy(t => t.Amount));
break;

case SortOrder.Decreasing:
Transactions = new ObservableCollection<TransactionViewModel>(_transactions.OrderByDescending(t => t.AmountBtc));
Transactions = new ObservableCollection<TransactionViewModel>(_transactions.OrderByDescending(t => t.Amount));
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using ReactiveUI;
using NBitcoin;
using ReactiveUI;
using System;
using System.Globalization;
using WalletWasabi.Gui.ViewModels;
Expand Down Expand Up @@ -33,6 +34,11 @@ public string AmountBtc
get => _model.AmountBtc;
}

public Money Amount
{
get => Money.TryParse(_model.AmountBtc, out Money money) ? money : Money.Zero;
}

public string Label
{
get => _model.Label;
Expand Down

0 comments on commit 52a556a

Please sign in to comment.