remove old flags, use the flags from config
MODIFY
WalletWasabi/WabiSabi/Backend/Banning/CoinVerifier.cs
WalletWasabi/WabiSabi/Backend/Banning/CoinVerifier.cs
@@ -13,30 +13,6 @@ public record CoinVerifyInfo(bool ShouldBan, Coin Coin);
public class CoinVerifier
{
- /// <summary>
- /// A list of indicator Id's that we use to filter out utxos from CoinJoin rounds based on API response.
- /// </summary>
- private readonly HashSet<int> _flagIds = new()
- {
- 11,
- 22,
- 34,
- 57,
- 58,
- 59,
- 60,
- 61,
- 62,
- 63,
- 150,
- 165,
- 174,
- 177,
- 267,
- 272,
- 340
- };
-
public CoinVerifier(CoinJoinIdStore coinJoinIdStore, CoinVerifierApiClient apiClient, Whitelist whitelist, WabiSabiConfig wabiSabiConfig)
{
CoinJoinIdStore = coinJoinIdStore;
@@ -46,12 +22,12 @@ public class CoinVerifier
}
// Blank constructor used for testing
- internal CoinVerifier(CoinJoinIdStore coinJoinIdStore, CoinVerifierApiClient apiClient)
+ internal CoinVerifier(CoinJoinIdStore coinJoinIdStore, CoinVerifierApiClient apiClient, WabiSabiConfig wabiSabiConfig)
{
CoinJoinIdStore = coinJoinIdStore;
CoinVerifierApiClient = apiClient;
Whitelist = new();
- WabiSabiConfig = new();
+ WabiSabiConfig = wabiSabiConfig;
}
public Whitelist Whitelist { get; }
@@ -133,7 +109,7 @@ public class CoinVerifier
bool shouldBan = false;
var coinflaglist = response.Cscore_section.Cscore_info;
- shouldBan = coinflaglist.Any(cscoreInfo => _flagIds.Contains(cscoreInfo.Id));
+ shouldBan = coinflaglist.Any(cscoreInfo => WabiSabiConfig.RiskFlags?.Contains(cscoreInfo.Id) ?? false);
return shouldBan;
}

remove old flags, use the flags from config