Use MemberNotNullWhen attribute
MODIFY
WalletWasabi/Blockchain/Keys/KeyManager.cs
WalletWasabi/Blockchain/Keys/KeyManager.cs
@@ -2,6 +2,7 @@ using NBitcoin;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Security;
@@ -111,6 +112,7 @@ namespace WalletWasabi.Blockchain.Keys
public bool IsWatchOnly => EncryptedSecret is null;
+ [MemberNotNullWhen(returnValue: true, nameof(MasterFingerprint))]
public bool IsHardwareWallet => EncryptedSecret is null && MasterFingerprint is { };
[JsonProperty(Order = 8)]

MODIFY
WalletWasabi/Blockchain/TransactionOutputs/SmartCoin.cs
WalletWasabi/Blockchain/TransactionOutputs/SmartCoin.cs
using NBitcoin;
using System;
+using System.Diagnostics.CodeAnalysis;
using WalletWasabi.Bases;
using WalletWasabi.Blockchain.Keys;
using WalletWasabi.Blockchain.Transactions;
@@ -147,6 +148,7 @@ namespace WalletWasabi.Blockchain.TransactionOutputs
IsBanned = BannedUntilUtc is { } && BannedUntilUtc > DateTimeOffset.UtcNow;
}
+ [MemberNotNullWhen(returnValue: true, nameof(SpenderTransaction))]
public bool IsSpent() => SpenderTransaction is { };
/// <summary>

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Round.cs
WalletWasabi/WabiSabi/Backend/Rounds/Round.cs
@@ -63,7 +63,10 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
public int InputCount => Alices.Sum(x => x.Coins.Count());
public List<Bob> Bobs { get; } = new();
public Round? BlameOf { get; } = null;
+
+ [MemberNotNullWhen(returnValue: true, nameof(BlameOf))]
public bool IsBlameRound => BlameOf is not null;
+
public ISet<OutPoint> BlameWhitelist { get; } = new HashSet<OutPoint>();
public byte[] UnsignedTxSecret { get; }
public Transaction Coinjoin { get; }

MODIFY
WalletWasabi/WebClients/Wasabi/HttpClientFactory.cs
WalletWasabi/WebClients/Wasabi/HttpClientFactory.cs
using System;
+using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Net.Http;
using WalletWasabi.Tor.Http;
@@ -54,6 +55,7 @@ namespace WalletWasabi.WebClients.Wasabi
public Func<Uri> BackendUriGetter { get; }
/// <summary>Whether Tor is enabled or disabled.</summary>
+ [MemberNotNullWhen(returnValue: true, nameof(TorEndpoint))]
public bool IsTorEnabled => TorEndpoint is { };
private SocketsHttpHandler SocketHandler { get; }

Use MemberNotNullWhen attribute