Use ScriptPubKey instead of HdPubKey
MODIFY
WalletWasabi/Blockchain/TransactionOutputs/ISmartCoin.cs
WalletWasabi/Blockchain/TransactionOutputs/ISmartCoin.cs
@@ -11,7 +11,7 @@ public interface ISmartCoin
/// <remarks>Note there might be a new script type that even NBitcoin does not support.</remarks>
ScriptType ScriptType { get; }
- HdPubKey HdPubKey { get; }
+ Script ScriptPubKey { get; }
double AnonymitySet { get; }

MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
@@ -893,14 +893,13 @@ public class CoinJoinClient
if (winner.Count < MaxInputsRegistrableByWallet)
{
-
// If the address of a winner contains other coins (address reuse, same HdPubKey) that are available but not selected,
// complete the selection with them until MaxInputsRegistrableByWallet threshold.
// Order by most to least reused to try not splitting coins from same address into several rounds.
var nonSelectedCoinsOnSameAddresses = filteredCoins
.Except(winner)
- .Where(x => winner.Any(y => y.HdPubKey == x.HdPubKey))
- .GroupBy(x => x.HdPubKey)
+ .Where(x => winner.Any(y => y.ScriptPubKey == x.ScriptPubKey))
+ .GroupBy(x => x.ScriptPubKey)
.OrderByDescending(g => g.Count())
.SelectMany(g => g)
.Take(MaxInputsRegistrableByWallet - winner.Count)

Use ScriptPubKey instead of HdPubKey