utilize is not null in some specific places
MODIFY
WalletWasabi.Fluent/Controls/ContentArea.axaml.cs
WalletWasabi.Fluent/Controls/ContentArea.axaml.cs
@@ -142,7 +142,7 @@ namespace WalletWasabi.Fluent.Controls
_captionPresenter = presenter;
_captionPresenter.PropertyChanged += PresenterOnPropertyChanged;
- _captionPresenter.IsVisible = Caption is { };
+ _captionPresenter.IsVisible = Caption is not null;
result = true;
break;
}
@@ -166,9 +166,9 @@ namespace WalletWasabi.Fluent.Controls
newValue.Classes.Add(className);
}
}
- else if (e.Property == CaptionProperty && _captionPresenter is { })
+ else if (e.Property == CaptionProperty && _captionPresenter is not null)
{
- _captionPresenter.IsVisible = e.NewValue is { };
+ _captionPresenter.IsVisible = e.NewValue is not null;
}
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/Base/DialogScreenViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/Base/DialogScreenViewModel.cs
@@ -30,7 +30,7 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs.Base
{
base.OnNavigated(oldPage, oldInStack, newPage, newInStack);
- IsDialogOpen = CurrentPage is { };
+ IsDialogOpen = CurrentPage is not null;
}
private static void CloseDialogs(IEnumerable<RoutableViewModel> navigationStack)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
@@ -49,7 +49,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
FeeText = $"{btcFeeText}{fiatFeeText}";
PayJoinUrl = info.PayJoinClient?.PaymentUrl.AbsoluteUri;
- IsPayJoin = PayJoinUrl is { };
+ IsPayJoin = PayJoinUrl is not null;
NextCommand = ReactiveCommand.CreateFromTask(async () => await OnNext(wallet, broadcaster, transaction));
}

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendControlViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendControlViewModel.cs
@@ -553,7 +553,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private set => this.RaiseAndSetIfChanged(ref _isCustomFee, value);
}
- public bool IsEstimateAvailable => Global.HostedServices.GetOrDefault<HybridFeeProvider>()?.AllFeeEstimate is { };
+ public bool IsEstimateAvailable => Global.HostedServices.GetOrDefault<HybridFeeProvider>()?.AllFeeEstimate is not null;
public string AmountWatermarkText
{

MODIFY
WalletWasabi.Tests/UnitTests/Hwi/HwiProcessBridgeMock.cs
WalletWasabi.Tests/UnitTests/Hwi/HwiProcessBridgeMock.cs
@@ -223,7 +223,7 @@ namespace WalletWasabi.Tests.UnitTests.Hwi
}
}
- return extPubKey is { };
+ return extPubKey is not null;
}
}
}

MODIFY
WalletWasabi/BitcoinCore/CoreNode.cs
WalletWasabi/BitcoinCore/CoreNode.cs
@@ -69,7 +69,7 @@ namespace WalletWasabi.BitcoinCore
WhiteBind? whiteBind = configTranslator.TryGetWhiteBind();
string authString;
- bool cookieAuth = rpcCookieFilePath is { };
+ bool cookieAuth = rpcCookieFilePath is not null;
if (cookieAuth)
{
authString = $"cookiefile={rpcCookieFilePath}";

MODIFY
WalletWasabi/Blockchain/Keys/KeyManager.cs
WalletWasabi/Blockchain/Keys/KeyManager.cs
@@ -113,7 +113,7 @@ namespace WalletWasabi.Blockchain.Keys
public bool IsWatchOnly => EncryptedSecret is null;
[MemberNotNullWhen(returnValue: true, nameof(MasterFingerprint))]
- public bool IsHardwareWallet => EncryptedSecret is null && MasterFingerprint is { };
+ public bool IsHardwareWallet => EncryptedSecret is null && MasterFingerprint is not null;
[JsonProperty(Order = 8)]
private BlockchainState BlockchainState { get; }

MODIFY
WalletWasabi/Blockchain/Mempool/MempoolService.cs
WalletWasabi/Blockchain/Mempool/MempoolService.cs
@@ -76,7 +76,7 @@ namespace WalletWasabi.Blockchain.Mempool
lock (BroadcastStoreLock)
{
entry = BroadcastStore.FirstOrDefault(x => x.TransactionId == transactionHash);
- return entry is { };
+ return entry is not null;
}
}

MODIFY
WalletWasabi/Blockchain/TransactionOutputs/SmartCoin.cs
WalletWasabi/Blockchain/TransactionOutputs/SmartCoin.cs
@@ -149,7 +149,7 @@ namespace WalletWasabi.Blockchain.TransactionOutputs
}
[MemberNotNullWhen(returnValue: true, nameof(SpenderTransaction))]
- public bool IsSpent() => SpenderTransaction is { };
+ public bool IsSpent() => SpenderTransaction is not null;
/// <summary>
/// IsUnspent() AND !SpentAccordingToBackend AND !CoinJoinInProgress

MODIFY
WalletWasabi/Extensions/NBitcoinExtensions.cs
WalletWasabi/Extensions/NBitcoinExtensions.cs
@@ -161,7 +161,7 @@ namespace NBitcoin
{
Guard.NotNull(nameof(me), me);
- bool notNull = me.WitScript is { };
+ bool notNull = me.WitScript is not null;
bool notEmpty = me.WitScript != WitScript.Empty;
return notNull && notEmpty;
}

MODIFY
WalletWasabi/Hwi/Parsers/HwiParser.cs
WalletWasabi/Hwi/Parsers/HwiParser.cs
@@ -42,7 +42,7 @@ namespace WalletWasabi.Hwi.Parsers
error = null;
}
- return error is { };
+ return error is not null;
}
public static bool TryParseError(JToken token, [NotNullWhen(true)] out HwiException? error)
@@ -88,7 +88,7 @@ namespace WalletWasabi.Hwi.Parsers
error = new HwiException(HwiErrorCode.UnknownError, "");
}
- return error is { };
+ return error is not null;
}
public static bool TryParseErrorCode(JToken codeToken, out HwiErrorCode code)

MODIFY
WalletWasabi/Wallets/Kitchen.cs
WalletWasabi/Wallets/Kitchen.cs
@@ -16,7 +16,7 @@ namespace WalletWasabi.Wallets
private object RefrigeratorLock { get; } = new object();
[MemberNotNullWhen(returnValue: true, nameof(Salt), nameof(Soup))]
- public bool HasIngredients => Salt is { } && Soup is { };
+ public bool HasIngredients => Salt is not null && Soup is not null;
public string SaltSoup()
{

MODIFY
WalletWasabi/WebClients/Wasabi/HttpClientFactory.cs
WalletWasabi/WebClients/Wasabi/HttpClientFactory.cs
@@ -58,7 +58,7 @@ namespace WalletWasabi.WebClients.Wasabi
/// <summary>Whether Tor is enabled or disabled.</summary>
[MemberNotNullWhen(returnValue: true, nameof(TorEndpoint))]
- public bool IsTorEnabled => TorEndpoint is { };
+ public bool IsTorEnabled => TorEndpoint is not null;
private SocketsHttpHandler SocketHandler { get; }

utilize is not null in some specific places