[trivial] Fix a few warnings
MODIFY
WalletWasabi.Tests/UnitTests/Crypto/GroupElements/GeneratorTests.cs
WalletWasabi.Tests/UnitTests/Crypto/GroupElements/GeneratorTests.cs
@@ -42,6 +42,7 @@ public class GeneratorTests
public void FriendlyNameNullCheck()
{
Assert.False(Generators.TryGetFriendlyGeneratorName(null, out var name));
+ Assert.NotNull(name);
Assert.Empty(name);
}
}

MODIFY
WalletWasabi.Tests/UnitTests/Transactions/TransactionProcessorTests.cs
WalletWasabi.Tests/UnitTests/Transactions/TransactionProcessorTests.cs
@@ -818,11 +818,13 @@ public class TransactionProcessorTests
// Ensure even if only tx2 was processed, the reference of the registered spender is to tx1
// and that the labels were merged.
var txid = tx1.GetHash();
- var registeredSpender = transactionProcessor.Coins.AsAllCoinsView().SpentBy(txid).Single().SpenderTransaction;
+ SmartTransaction? registeredSpender = transactionProcessor.Coins.AsAllCoinsView().SpentBy(txid).Single().SpenderTransaction;
+ Assert.NotNull(registeredSpender);
+
Assert.Same(tx1, registeredSpender);
Assert.NotSame(tx2, registeredSpender);
- Assert.Contains("foo", registeredSpender?.Label.Select(x => x.ToString()));
- Assert.Contains("bar", registeredSpender?.Label.Select(x => x.ToString()));
+ Assert.Contains("foo", registeredSpender.Label.Select(x => x.ToString()));
+ Assert.Contains("bar", registeredSpender.Label.Select(x => x.ToString()));
}
[Fact]

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Integration/WabiSabiHttpApiIntegrationTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Integration/WabiSabiHttpApiIntegrationTests.cs
@@ -561,7 +561,7 @@ public class WabiSabiHttpApiIntegrationTests : IClassFixture<WabiSabiApiApplicat
throw new Exception("This is not so possible.");
}
}
- catch (OperationCanceledException e)
+ catch (OperationCanceledException)
{
throw new TimeoutException("Coinjoin was not propagated.");
}

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/SerializationTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/SerializationTests.cs
@@ -66,6 +66,7 @@ public class SerializationTests
Assert.Equal(Generators.Gx1, deserializedGroupElements[1]);
var deserializedGroupElementVector = JsonConvert.DeserializeObject<GroupElementVector>("[\"02E33C9F3CBE6388A2D3C3ECB12153DB73499928541905D86AAA4FFC01F2763B54\",\"0246253CC926AAB789BAA278AB9A54EDEF455CA2014038E9F84DE312C05A8121CC\"]", converters);
+ Assert.NotNull(deserializedGroupElementVector);
Assert.Equal(deserializedGroupElements, deserializedGroupElementVector);
}
@@ -139,6 +140,7 @@ public class SerializationTests
Assert.Equal(three, deserializedScalars[1]);
var deserializedScalarVector = JsonConvert.DeserializeObject<ScalarVector>("[\"000000000000000000000000000000014551231950B75FC4402DA1732FC9BEC2\",\"0000000000000000000000000000000000000000000000000000000000000003\"]", converters);
+ Assert.NotNull(deserializedScalarVector);
Assert.Equal(deserializedScalars, deserializedScalarVector);
}

MODIFY
WalletWasabi/BitcoinCore/Monitoring/RpcFeeProvider.cs
WalletWasabi/BitcoinCore/Monitoring/RpcFeeProvider.cs
@@ -41,7 +41,7 @@ public class RpcFeeProvider : PeriodicRunner
}
InError = false;
}
- catch (NoEstimationException ex)
+ catch (NoEstimationException)
{
Logging.Logger.LogInfo("Couldn't get fee estimation from the Bitcoin node, probably because it was not yet initialized.");
InError = true;

[trivial] Fix a few warnings (#9151)