Move classes into there own files
MODIFY
WalletWasabi.Tests/UnitTests/UserInterfaceTest/PocketSelectionTests.cs
WalletWasabi.Tests/UnitTests/UserInterfaceTest/PocketSelectionTests.cs
@@ -2,7 +2,6 @@ using System.Collections.Generic;
using System.Linq;
using NBitcoin;
using WalletWasabi.Blockchain.Analysis.Clustering;
-using WalletWasabi.Blockchain.Keys;
using WalletWasabi.Blockchain.TransactionOutputs;
using WalletWasabi.Fluent.Helpers;
using WalletWasabi.Fluent.Models;
@@ -1032,51 +1031,3 @@ public class PocketSelectionTests
Assert.False(selection.IsOtherSelectionPossible(output.SelectMany(x => x.Coins), recipient));
}
}
-
-internal static class LabelTestExtensions
-{
- private static readonly KeyManager KeyManager = ServiceFactory.CreateKeyManager();
-
- public static LabelViewModel GetLabel(this LabelSelectionViewModel selection, string label)
- {
- return selection.AllLabelsViewModel.Single(x => x.Value == label);
- }
-
- public static void AddPocket(this List<Pocket> pockets, decimal amount, out Pocket pocket, params string[] labels)
- {
- var label = new SmartLabel(labels);
- var coinsView = new CoinsView(new[] { BitcoinFactory.CreateSmartCoin(NewKey(label), amount) });
- pocket = new Pocket((label, coinsView));
- pockets.Add(pocket);
- }
-
- public static HdPubKey NewKey(string label = "", int anonymitySet = 1)
- {
- var key = KeyManager.GenerateNewKey(label, KeyState.Used, true, false);
- key.SetAnonymitySet(anonymitySet);
- key.SetLabel(label);
-
- return key;
- }
-
- public static SmartCoin CreateCoin(decimal amount, string label = "", int anonymitySet = 1)
- {
- var coin = BitcoinFactory.CreateSmartCoin(NewKey(label: label, anonymitySet: anonymitySet), amount);
- coin.HdPubKey.SetAnonymitySet(anonymitySet);
-
- return coin;
- }
-
- public static Pocket CreateSingleCoinPocket(decimal amount, string label = "", int anonSet = 0)
- {
- var coins = new[]
- {
- CreateCoin(amount, label, anonSet)
- };
-
- var coinsView = new CoinsView(coins.ToArray());
- var pocket = new Pocket((label, coinsView));
-
- return pocket;
- }
-}

MODIFY
WalletWasabi/WabiSabi/Client/Decomposer.cs
WalletWasabi/WabiSabi/Client/Decomposer.cs
@@ -74,29 +74,3 @@ public static class Decomposer
return list;
}
}
-
-public static class LinqEx
-{
- public static IEnumerable<T> TakeUntil<T>(this IEnumerable<T> list, Func<T, bool> predicate)
- {
- foreach (T el in list)
- {
- yield return el;
- if (predicate(el))
- {
- yield break;
- }
- }
- }
-}
-
-public class ReverseComparer : IComparer<long>
-{
- public static readonly ReverseComparer Default = new();
-
- public int Compare(long x, long y)
- {
- // Compare y and x in reverse order.
- return y.CompareTo(x);
- }
-}

Move classes into there own files