Improve transaction search
MODIFY
WalletWasabi.Fluent/TransactionWatcher.cs
WalletWasabi.Fluent/TransactionWatcher.cs
@@ -23,7 +23,9 @@ public class TransactionWatcher
{
var toRemove = r.Items.Where(r => r.Parent == msg.HistoryViewModel).ToList();
r.Remove(toRemove);
- r.AddOrUpdate(msg.NewHistoryList.Select(b => new TransactionEntry(msg.HistoryViewModel, b)));
+ r.AddOrUpdate(msg.NewHistoryList
+ .OrderByDescending(r => r.Date)
+ .Select(b => new TransactionEntry(msg.HistoryViewModel, b)));
});
});

MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/Sources/TransactionsSource.cs
WalletWasabi.Fluent/ViewModels/SearchBar/Sources/TransactionsSource.cs
-using System.Collections.Generic;
+using System.Linq;
using DynamicData;
using WalletWasabi.Fluent.ViewModels.SearchBar.Patterns;
using WalletWasabi.Fluent.ViewModels.SearchBar.SearchItem;
@@ -14,7 +14,11 @@ public class TransactionsSource : ISearchItemSource
private static ISearchItem ToSearchItem(TransactionEntry r)
{
- return new NonActionableSearchItem(r.HistoryItem.Label, r.HistoryItem.Date.ToString(), "Transactions", new List<string>(), "normal_transaction")
+ var transactionId = r.HistoryItem.Id.ToString().Trim('0');
+ var keywords = r.HistoryItem.Label.Concat(new[] { transactionId });
+
+ var labels = r.HistoryItem.Label is not null ? string.Join(" ", r.HistoryItem.Label) : "";
+ return new NonActionableSearchItem(r.HistoryItem.Date.Date.ToShortDateString(), labels, "Transactions", keywords.ToList(), "normal_transaction")
{
IsDefault = true,
};

Improve transaction search