Fix color of single coinjoin history item
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/CoinJoinHistoryItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/CoinJoinHistoryItemViewModel.cs
@@ -15,7 +15,8 @@ public class CoinJoinHistoryItemViewModel : HistoryItemViewModelBase
TransactionSummary transactionSummary,
WalletViewModel walletViewModel,
Money balance,
- IObservable<Unit> updateTrigger)
+ IObservable<Unit> updateTrigger,
+ bool isSingleCoinJoinTransaction)
: base(orderIndex, transactionSummary)
{
IsConfirmed = transactionSummary.IsConfirmed();
@@ -23,6 +24,7 @@ public class CoinJoinHistoryItemViewModel : HistoryItemViewModelBase
Balance = balance;
IsCoinJoin = true;
CoinJoinTransaction = transactionSummary;
+ IsSingleCoinJoinTransaction = isSingleCoinJoinTransaction;
var amount = transactionSummary.Amount;
if (amount < Money.Zero)
@@ -41,7 +43,7 @@ public class CoinJoinHistoryItemViewModel : HistoryItemViewModelBase
DateString = $"{Date.ToLocalTime():MM/dd/yy HH:mm}";
}
- public bool IsCoinJoinTransaction => true;
+ public bool IsSingleCoinJoinTransaction { get; }
public TransactionSummary CoinJoinTransaction { get; private set; }

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/CoinJoinsHistoryItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/CoinJoinsHistoryItemViewModel.cs
@@ -54,7 +54,8 @@ public class CoinJoinsHistoryItemViewModel : HistoryItemViewModelBase
item,
_walletViewModel,
balance,
- _updateTrigger);
+ _updateTrigger,
+ false);
balance -= item.Amount;

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
@@ -277,7 +277,7 @@ public partial class HistoryViewModel : ActivatableViewModel
{
if (cjg.CoinJoinTransactions.Count == 1)
{
- var singleCjItem = new CoinJoinHistoryItemViewModel(cjg.OrderIndex, cjg.CoinJoinTransactions.First(), _walletViewModel, balance, _updateTrigger);
+ var singleCjItem = new CoinJoinHistoryItemViewModel(cjg.OrderIndex, cjg.CoinJoinTransactions.First(), _walletViewModel, balance, _updateTrigger, true);
yield return singleCjItem;
}
else

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
ElementFactory="{TemplateBinding ElementFactory}"
Items="{TemplateBinding Columns}"
Rows="{TemplateBinding Rows}"
- Classes.coinJoinTransaction="{Binding IsCoinJoinTransaction}"
+ Classes.coinJoinTransaction="{Binding !IsSingleCoinJoinTransaction}"
x:CompileBindings="False"/>
<Rectangle Name="PART_Separator"
Margin="-2,0,0,0"

Fix color of single coinjoin history item