Order by anonset first so we make sure that coins those needs to get mixed are selected instead of private coins
MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
@@ -718,7 +718,9 @@ public class CoinJoinClient
int sameTxAllowance = GetRandomBiasedSameTxAllowance(rnd);
var winner = new List<SmartCoin>();
- foreach (var coin in finalCandidate.OrderByDescending(x => x.Amount))
+ foreach (var coin in finalCandidate
+ .OrderBy(x => x.HdPubKey.AnonymitySet)
+ .ThenByDescending(x => x.Amount))
{
// If the coin is coming from same tx, then check our allowance.
if (winner.Any(x => x.TransactionId == coin.TransactionId))

Order by anonset first so we make sure that coins those needs to get mixed are selected instead of private coins