Remove abstract members
MODIFY
WalletWasabi.Fluent/ViewModels/CoinControl/Core/CoinCoinControlItemViewModel.cs
WalletWasabi.Fluent/ViewModels/CoinControl/Core/CoinCoinControlItemViewModel.cs
-using System.Collections.Generic;
using System.Collections.Immutable;
-using NBitcoin;
-using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.TransactionOutputs;
namespace WalletWasabi.Fluent.ViewModels.CoinControl.Core;
@@ -21,15 +18,4 @@ internal class CoinCoinControlItemViewModel : CoinControlItemViewModelBase
BannedUntilUtc = smartCoin.BannedUntilUtc;
Children = ImmutableList<CoinControlItemViewModelBase>.Empty;
}
-
- public override DateTimeOffset? BannedUntilUtc { get; }
- public override IReadOnlyCollection<CoinControlItemViewModelBase> Children { get; }
- public override bool IsConfirmed { get; }
- public override bool IsCoinjoining { get; }
- public override bool IsBanned { get; }
- public override string ConfirmationStatus { get; }
- public override Money Amount { get; }
- public override string BannedUntilUtcToolTip { 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
@@ -13,25 +13,25 @@ public abstract class CoinControlItemViewModelBase
public bool IsNonPrivate => !IsSemiPrivate && !IsPrivate;
- public abstract IReadOnlyCollection<CoinControlItemViewModelBase> Children { get; }
+ public IReadOnlyCollection<CoinControlItemViewModelBase> Children { get; protected set; }
- public abstract bool IsConfirmed { get; }
+ public bool IsConfirmed { get; protected set; }
- public abstract bool IsCoinjoining { get; }
+ public bool IsCoinjoining { get; protected set; }
- public abstract bool IsBanned { get; }
+ public bool IsBanned { get; protected set; }
- public abstract string ConfirmationStatus { get; }
+ public string ConfirmationStatus { get; protected set; }
- public abstract Money Amount { get; }
+ public Money Amount { get; protected set; }
- public abstract string BannedUntilUtcToolTip { get; }
+ public string BannedUntilUtcToolTip { get; protected set; }
- public abstract int AnonymityScore { get; }
+ public int AnonymityScore { get; protected set; }
- public bool IsExpanded { get; set; } = true;
+ public SmartLabel Labels { get; protected set; }
- public abstract SmartLabel Labels { get; }
+ public DateTimeOffset? BannedUntilUtc { get; protected set; }
- public abstract DateTimeOffset? BannedUntilUtc { get; }
+ public bool IsExpanded { get; set; } = true;
}

MODIFY
WalletWasabi.Fluent/ViewModels/CoinControl/Core/PocketCoinControlItemViewModel.cs
WalletWasabi.Fluent/ViewModels/CoinControl/Core/PocketCoinControlItemViewModel.cs
-using System.Collections.Generic;
using System.Linq;
-using NBitcoin;
-using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Fluent.Models;
namespace WalletWasabi.Fluent.ViewModels.CoinControl.Core;
@@ -13,25 +10,14 @@ internal class PocketCoinControlItemViewModel : CoinControlItemViewModelBase
var confirmationCount = pocket.Coins.Count();
var unconfirmedCount = pocket.Coins.Count(x => !x.Confirmed);
var allConfirmed = confirmationCount == unconfirmedCount;
+ IsBanned = pocket.Coins.Any(x => x.IsBanned);
ConfirmationStatus = allConfirmed ? "All coins are confirmed" : $"{unconfirmedCount} coins are waiting for confirmation";
- BannedUntilUtcToolTip = pocket.Coins.Any(x => x.IsBanned) ? "Some coins can't participate in coinjoin" : "";
+ BannedUntilUtcToolTip = IsBanned ? "Some coins can't participate in coinjoin" : "";
Amount = pocket.Amount;
IsConfirmed = allConfirmed;
IsCoinjoining = pocket.Coins.Any(x => x.CoinJoinInProgress);
- IsBanned = pocket.Coins.Any(x => x.IsBanned);
AnonymityScore = (int) pocket.Coins.Max(x => x.HdPubKey.AnonymitySet);
Labels = pocket.Labels;
Children = pocket.Coins.OrderByDescending(x => x.Amount).Select(coin => new CoinCoinControlItemViewModel(coin)).ToList();
}
-
- public override IReadOnlyCollection<CoinControlItemViewModelBase> Children { get; }
- public override bool IsConfirmed { get; }
- public override bool IsCoinjoining { get; }
- public override bool IsBanned { get; }
- public override string ConfirmationStatus { get; }
- public override Money Amount { get; }
- public override string BannedUntilUtcToolTip { get; }
- public override int AnonymityScore { get; }
- public override SmartLabel Labels { get; }
- public override DateTimeOffset? BannedUntilUtc => null;
}

Remove abstract members