More .Any() calls in place of .Count() for performance, clarity
MODIFY
WalletWasabi.Tests/RegTests.cs
WalletWasabi.Tests/RegTests.cs
@@ -2368,7 +2368,7 @@ namespace WalletWasabi.Tests
chaumianClient2.Start();
smartCoin1.Locked = true;
- Assert.True(0 == (await chaumianClient1.QueueCoinsToMixAsync(password, smartCoin1)).Count());
+ Assert.True(!(await chaumianClient1.QueueCoinsToMixAsync(password, smartCoin1)).Any());
Assert.True(smartCoin1.Locked);
await Assert.ThrowsAsync<SecurityException>(async () => await chaumianClient1.QueueCoinsToMixAsync("asdasdasd", smartCoin1, smartCoin2));

MODIFY
WalletWasabi/KeyManagement/KeyManager.cs
WalletWasabi/KeyManagement/KeyManager.cs
@@ -160,7 +160,7 @@ namespace WalletWasabi.KeyManagement
}
KeyPath path;
- if (relevantHdPubKeys.Count() == 0)
+ if (!relevantHdPubKeys.Any())
{
path = new KeyPath($"{change}/0");
}

MODIFY
WalletWasabi/Models/ChaumianCoinJoin/CcjRound.cs
WalletWasabi/Models/ChaumianCoinJoin/CcjRound.cs
@@ -433,7 +433,7 @@ namespace WalletWasabi.Models.ChaumianCoinJoin
case CcjRoundPhase.Signing:
{
var alicesToBan = await RemoveAlicesIfInputsSpentAsync();
- if (alicesToBan.Count() != 0)
+ if (alicesToBan.Any())
{
await UtxoReferee.BanUtxosAsync(1, DateTimeOffset.Now, alicesToBan.SelectMany(x => x.Inputs).Select(y => y.OutPoint).ToArray());
}

MODIFY
WalletWasabi/Services/CcjClient.cs
WalletWasabi/Services/CcjClient.cs
@@ -350,7 +350,7 @@ namespace WalletWasabi.Services
inputRegistrableRound.State.FeePerInputs,
inputRegistrableRound.State.FeePerOutputs);
- if (registrableCoins.Count() > 0)
+ if (registrableCoins.Any())
{
BitcoinAddress changeAddress = null;
BitcoinAddress activeAddress = null;

More .Any() calls in place of .Count() for performance, clarity