Use MemberNotNullWhen to fix null warnings
MODIFY
WalletWasabi.Gui/Rpc/JsonRpcRequest.cs
WalletWasabi.Gui/Rpc/JsonRpcRequest.cs
@@ -34,6 +34,7 @@ namespace WalletWasabi.Gui.Rpc
/// Gets a value indicating whether the JsonRpcRequest is a notification request
/// which means the client is not interested in receiving a response.
/// </summary>
+ [MemberNotNullWhen(returnValue: false, nameof(Id))]
public bool IsNotification => Id is null;
/// <summary>

MODIFY
WalletWasabi/BitcoinCore/Rpc/Models/VerboseInputInfo.cs
WalletWasabi/BitcoinCore/Rpc/Models/VerboseInputInfo.cs
using NBitcoin;
+using System.Diagnostics.CodeAnalysis;
namespace WalletWasabi.BitcoinCore.Rpc.Models
{
@@ -26,6 +27,8 @@ namespace WalletWasabi.BitcoinCore.Rpc.Models
public VerboseOutputInfo? PrevOutput { get; }
public string? Coinbase { get; }
+
+ [MemberNotNullWhen(returnValue: true, nameof(Coinbase))]
public bool IsCoinbase => Coinbase is not null;
}
}

MODIFY
WalletWasabi/Blockchain/Keys/KeyManager.cs
WalletWasabi/Blockchain/Keys/KeyManager.cs
@@ -110,6 +110,7 @@ namespace WalletWasabi.Blockchain.Keys
public string FilePath { get; private set; }
+ [MemberNotNullWhen(returnValue: false, nameof(EncryptedSecret))]
public bool IsWatchOnly => EncryptedSecret is null;
[MemberNotNullWhen(returnValue: true, nameof(MasterFingerprint))]

MODIFY
WalletWasabi/Nito/Disposables/Internals/BoundAction.cs
WalletWasabi/Nito/Disposables/Internals/BoundAction.cs
using System;
+using System.Diagnostics.CodeAnalysis;
using System.Threading;
namespace Nito.Disposables.Internals
@@ -35,6 +36,7 @@ namespace Nito.Disposables.Internals
/// <summary>
/// Whether the field is empty.
/// </summary>
+ [MemberNotNullWhen(returnValue: false, nameof(_field))]
public bool IsEmpty => Interlocked.CompareExchange(ref _field, null, null) is null;
/// <summary>

Use MemberNotNullWhen to fix null warnings