Early work on TX selection
MODIFY
WalletWasabi.Fluent/TransactionsWatcher.cs
WalletWasabi.Fluent/TransactionsWatcher.cs
@@ -24,7 +24,7 @@ public class TransactionsWatcher
r.Remove(toRemove);
r.AddOrUpdate(msg.NewHistoryList
.OrderByDescending(r => r.Date)
- .Select(b => new TransactionEntry(msg.HistoryViewModel, b)));
+ .Select(b => new TransactionEntry(msg.HistoryViewModel, b, msg.WalletViewModel)));
});
});

MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/Sources/TransactionItemsSource.cs
WalletWasabi.Fluent/ViewModels/SearchBar/Sources/TransactionItemsSource.cs
using System.Linq;
+using System.Threading.Tasks;
using DynamicData;
using WalletWasabi.Fluent.ViewModels.SearchBar.Patterns;
using WalletWasabi.Fluent.ViewModels.SearchBar.SearchItems;
@@ -14,8 +15,7 @@ public class TransactionsSource : ISearchItemSource
private static ISearchItem ToSearchItem(TransactionEntry r)
{
- var transactionId = r.HistoryItem.Id.ToString().Trim('0');
- var keywords = r.HistoryItem.Label?.Concat(new[] { transactionId }) ?? Enumerable.Empty<string>();
- return new NonActionableSearchItem(new TransactionSearchItem(r.HistoryItem), "", "Transactions", keywords.ToList(), "normal_transaction");
+ var transactionId = new string(r.HistoryItem.Id.ToString().Trim('0').Take(10).ToArray());
+ return new ActionableItem(transactionId, $"Found in {r.Wallet.WalletName}", async () => r.Parent.SelectTransaction(r.HistoryItem.Id), "Transactions");
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
@@ -223,7 +223,7 @@ public partial class HistoryViewModel : ActivatableViewModel
var rawHistoryList = await Task.Run(historyBuilder.BuildHistorySummary);
var orderedRawHistoryList = rawHistoryList.OrderBy(x => x.DateTime).ThenBy(x => x.Height).ThenBy(x => x.BlockIndex).ToList();
var newHistoryList = GenerateHistoryList(orderedRawHistoryList).ToArray();
- MessageBus.Current.SendMessage(new TransactionsChangedMessage(this, newHistoryList));
+ MessageBus.Current.SendMessage(new TransactionsChangedMessage(this, newHistoryList, _walletViewModel));
_transactionSourceList.Edit(x =>
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionEntry.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionEntry.cs
@@ -6,14 +6,19 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History;
public class TransactionEntry
{
public HistoryItemViewModelBase HistoryItem { get; }
+ public WalletViewModel Wallet { get; }
- public TransactionEntry(HistoryViewModel parent, HistoryItemViewModelBase historyItem)
+ public TransactionEntry(
+ HistoryViewModel parent,
+ HistoryItemViewModelBase historyItem,
+ WalletViewModel wallet)
{
Parent = parent;
HistoryItem = historyItem;
+ Wallet = wallet;
Key = new ComposedKey(Parent, HistoryItem.Id);
}
public ComposedKey Key { get; }
- public HistoryViewModel Parent { get; set; }
+ public HistoryViewModel Parent { get; }
}

Early work on TX selection