Annihilate CrashReporter from Gui
MODIFY
WalletWasabi.Fluent.Desktop/Program.cs
WalletWasabi.Fluent.Desktop/Program.cs
@@ -7,7 +7,7 @@ using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
-using WalletWasabi.CrashReport;
+using WalletWasabi.Fluent.CrashReport;
using WalletWasabi.Fluent.Helpers;
using WalletWasabi.Gui;
using WalletWasabi.Gui.CommandLine;

MODIFY
WalletWasabi.Fluent/CrashReport/CrashReporter.cs
WalletWasabi.Fluent/CrashReport/CrashReporter.cs
@@ -4,7 +4,7 @@ using WalletWasabi.Logging;
using WalletWasabi.Microservices;
using WalletWasabi.Models;
-namespace WalletWasabi.CrashReport
+namespace WalletWasabi.Fluent.CrashReport
{
public class CrashReporter
{

MODIFY
WalletWasabi.Gui/Program.cs
WalletWasabi.Gui/Program.cs
@@ -11,7 +11,6 @@ using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
-using WalletWasabi.CrashReport;
using WalletWasabi.Gui.CommandLine;
using WalletWasabi.Gui.ViewModels;
using WalletWasabi.Helpers;
@@ -29,9 +28,6 @@ namespace WalletWasabi.Gui
{
private static Global Global;
- // This is only needed to pass CrashReporter to AppMainAsync otherwise it could be a local variable in Main().
- private static CrashReporter CrashReporter = new CrashReporter();
-
private static TerminateService TerminateService = new TerminateService(TerminateApplicationAsync);
/// Warning! In Avalonia applications Main must not be async. Otherwise application may not run on OSX.
@@ -45,7 +41,6 @@ namespace WalletWasabi.Gui
{
Global = CreateGlobal();
Locator.CurrentMutable.RegisterConstant(Global);
- Locator.CurrentMutable.RegisterConstant(CrashReporter);
Platform.BaseDirectory = Path.Combine(Global.DataDir, "Gui");
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
@@ -129,10 +124,6 @@ namespace WalletWasabi.Gui
else if (ex is { })
{
Logger.LogCritical(ex);
- if (runGui)
- {
- CrashReporter.SetException(ex);
- }
}
TerminateService.Terminate(ex is { } ? 1 : 0);

MODIFY
WalletWasabi.Tests/UnitTests/Clients/CrashReportTests.cs
WalletWasabi.Tests/UnitTests/Clients/CrashReportTests.cs
using System;
-using WalletWasabi.CrashReport;
+using WalletWasabi.Fluent.CrashReport;
using Xunit;
namespace WalletWasabi.Tests.UnitTests.Clients

MODIFY
WalletWasabi.Tests/WalletWasabi.Tests.csproj
WalletWasabi.Tests/WalletWasabi.Tests.csproj
<ItemGroup>
<ProjectReference Include="..\WalletWasabi.Backend\WalletWasabi.Backend.csproj" />
+ <ProjectReference Include="..\WalletWasabi.Fluent\WalletWasabi.Fluent.csproj" />
<ProjectReference Include="..\WalletWasabi.Gui\WalletWasabi.Gui.csproj" />
<ProjectReference Include="..\WalletWasabi.Packager\WalletWasabi.Packager.csproj" />
<ProjectReference Include="..\WalletWasabi\WalletWasabi.csproj" />

Annihilate CrashReporter from Gui