Fix always TRUE expressions (bugs)
MODIFY
WalletWasabi/Http/Models/StartLine.cs
WalletWasabi/Http/Models/StartLine.cs
@@ -45,11 +45,6 @@ namespace WalletWasabi.Http.Models
if (parts.Count == 2)
{
- if (part == null)
- {
- throw new Exception($"Wrong {startLineString} provided.");
- }
-
var rest = reader.ReadToEnd();
// startLineString must end here, the ReadToEnd returns "" if nothing to read instead of null

MODIFY
WalletWasabi/KeyManagement/KeyManager.cs
WalletWasabi/KeyManagement/KeyManager.cs
@@ -198,7 +198,7 @@ namespace WalletWasabi.KeyManagement
{
return HdPubKeys.Where(x => x.KeyState == keyState);
}
- else if (keyState == null && isInternal != null)
+ else if (keyState == null)
{
return HdPubKeys.Where(x => x.IsInternal() == isInternal);
}

MODIFY
WalletWasabi/Services/WalletService.cs
WalletWasabi/Services/WalletService.cs
@@ -107,7 +107,7 @@ namespace WalletWasabi.Services
await DeleteBlockAsync(invalidBlockHash);
WalletBlocks.RemoveByValue(invalidBlockHash);
ProcessedBlocks.Remove(invalidBlockHash);
- if (elem.Key != null)
+ if (elem.Key != default(Height))
{
foreach (var toRemove in Coins.Where(x => x.Height == elem.Key).ToHashSet())
{

MODIFY
WalletWasabi/TorSocks5/TorSocks5Client.cs
WalletWasabi/TorSocks5/TorSocks5Client.cs
@@ -40,7 +40,7 @@ namespace WalletWasabi.TorSocks5
{
try
{
- if (TcpClient == null || !TcpClient.Connected || TcpClient.GetStream() == null)
+ if (TcpClient == null || !TcpClient.Connected)
{
return false;
}

Fix always TRUE expressions (bugs)