Hide anonscore for pockets
MODIFY
WalletWasabi.Fluent/ViewModels/CoinControl/Core/CoinCoinControlItemViewModel.cs
WalletWasabi.Fluent/ViewModels/CoinControl/Core/CoinCoinControlItemViewModel.cs
@@ -27,6 +27,6 @@ internal class CoinCoinControlItemViewModel : CoinControlItemViewModelBase
public override string ConfirmationStatus { get; }
public override Money Amount { get; }
public override string BannedUntilUtcToolTip { get; }
- public override int? AnonymityScore { get; }
+ public override int AnonymityScore { get; }
public override SmartLabel Labels { get; }
}

MODIFY
WalletWasabi.Fluent/ViewModels/CoinControl/Core/CoinControlItemViewModelBase.cs
WalletWasabi.Fluent/ViewModels/CoinControl/Core/CoinControlItemViewModelBase.cs
@@ -34,7 +34,7 @@ public abstract class CoinControlItemViewModelBase
public abstract string BannedUntilUtcToolTip { get; }
- public abstract int? AnonymityScore { get; }
+ public abstract int AnonymityScore { get; }
public bool IsExpanded { get; set; } = true;

MODIFY
WalletWasabi.Fluent/ViewModels/CoinControl/Core/PocketCoinControlItemViewModel.cs
WalletWasabi.Fluent/ViewModels/CoinControl/Core/PocketCoinControlItemViewModel.cs
@@ -12,7 +12,7 @@ internal class PocketCoinControlItemViewModel : CoinControlItemViewModelBase
Amount = pocket.Amount;
IsConfirmed = pocket.Coins.All(x => x.Confirmed);
IsCoinjoining = pocket.Coins.Any(x => x.CoinJoinInProgress);
- AnonymityScore = (int?) pocket.Coins.Select(x => x.HdPubKey.AnonymitySet).DefaultIfEmpty().Max();
+ AnonymityScore = (int) pocket.Coins.Max(x => x.HdPubKey.AnonymitySet);
Labels = pocket.Labels;
}
@@ -22,7 +22,7 @@ internal class PocketCoinControlItemViewModel : CoinControlItemViewModelBase
public override string ConfirmationStatus => "";
public override Money Amount { get; }
public override string BannedUntilUtcToolTip => "";
- public override int? AnonymityScore { get; }
+ public override int AnonymityScore { get; }
public override SmartLabel Labels { get; }
public override DateTimeOffset? BannedUntilUtc => null;
}

MODIFY
WalletWasabi.Fluent/ViewModels/CoinControl/SelectCoinsDialogViewModel.cs
WalletWasabi.Fluent/ViewModels/CoinControl/SelectCoinsDialogViewModel.cs
@@ -91,7 +91,7 @@ public partial class SelectCoinsDialogViewModel : DialogViewModelBase<IEnumerabl
{
return new PrivacyTextColumn<CoinControlItemViewModelBase>(
new AnonymityScoreHeaderViewModel(),
- node => node.AnonymityScore.ToString(),
+ node => node is CoinCoinControlItemViewModel coin ? coin.AnonymityScore.ToString() : "",
GridLength.Auto,
new TextColumnOptions<CoinControlItemViewModelBase>
{

Hide anonscore for pockets