Remove null-conditional operator
MODIFY
WalletWasabi.Backend/Startup.cs
WalletWasabi.Backend/Startup.cs
@@ -117,7 +117,7 @@ namespace WalletWasabi.Backend
if (global.P2pNode is { })
{
- global.P2pNode?.Dispose();
+ global.P2pNode.Dispose();
Logger.LogInfo($"{nameof(global.P2pNode)} is disposed.");
}

MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -603,7 +603,7 @@ namespace WalletWasabi.Gui
keyManager.ToFile(backupWalletFilePath);
Logger.LogInfo($"{nameof(walletService.KeyManager)} backup saved to `{backupWalletFilePath}`.");
}
- walletService?.Dispose();
+ walletService.Dispose();
WalletService = null;
Logger.LogInfo($"{nameof(WalletService)} is stopped.");
}

MODIFY
WalletWasabi/BitcoinCore/P2pNode.cs
WalletWasabi/BitcoinCore/P2pNode.cs
@@ -174,7 +174,7 @@ namespace WalletWasabi.BitcoinCore
try
{
- Node?.Disconnect();
+ Node.Disconnect();
}
catch (Exception ex)
{
@@ -184,7 +184,7 @@ namespace WalletWasabi.BitcoinCore
{
try
{
- Node?.Dispose();
+ Node.Dispose();
}
catch (Exception ex)
{

Remove null-conditional operator