Use SmartLabel
MODIFY
WalletWasabi/Blockchain/Transactions/TransactionHistoryBuilder.cs
WalletWasabi/Blockchain/Transactions/TransactionHistoryBuilder.cs
@@ -2,6 +2,7 @@ using NBitcoin;
using System;
using System.Collections.Generic;
using System.Linq;
+using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.Blocks;
using WalletWasabi.Blockchain.TransactionOutputs;
using WalletWasabi.Models;
@@ -57,10 +58,9 @@ namespace WalletWasabi.Blockchain.Transactions
var found = txRecordList.FirstOrDefault(x => x.TransactionId == coin.TransactionId);
if (found is { }) // if found then update
{
- var label = !string.IsNullOrEmpty(found.Label) ? found.Label + ", " : "";
found.DateTime = dateTime;
found.Amount += coin.Amount;
- found.Label = $"{label}{coin.Label}";
+ found.Label = SmartLabel.Merge(found.Label, coin.Label);
}
else
{
@@ -112,7 +112,7 @@ namespace WalletWasabi.Blockchain.Transactions
DateTime = dateTime,
Height = foundSpenderTransaction.Height,
Amount = Money.Zero - coin.Amount,
- Label = "",
+ Label = SmartLabel.Empty,
TransactionId = coin.SpenderTransactionId,
BlockIndex = foundSpenderTransaction.BlockIndex,
IsLikelyCoinJoinOutput = coin.IsLikelyCoinJoinOutput is true

MODIFY
WalletWasabi/Blockchain/Transactions/TransactionSummary.cs
WalletWasabi/Blockchain/Transactions/TransactionSummary.cs
using NBitcoin;
using System;
+using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Models;
namespace WalletWasabi.Blockchain.Transactions
@@ -9,7 +10,7 @@ namespace WalletWasabi.Blockchain.Transactions
public DateTimeOffset DateTime { get; set; }
public Height Height { get; set; }
public Money Amount { get; set; }
- public string Label { get; set; }
+ public SmartLabel Label { get; set; }
public uint256 TransactionId { get; set; }
public int BlockIndex { get; set; }
public bool IsLikelyCoinJoinOutput { get; set; }

Use SmartLabel