Display error on Save Qr code fail.
MODIFY
WalletWasabi.Gui/Controls/QrCode.cs
WalletWasabi.Gui/Controls/QrCode.cs
@@ -4,14 +4,13 @@ using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Media;
using Avalonia.Media.Imaging;
using Avalonia.Metadata;
-using Avalonia.Platform;
using ReactiveUI;
using System;
using System.IO;
using System.Reactive;
using System.Reactive.Linq;
using System.Threading.Tasks;
-using WalletWasabi.Helpers;
+using WalletWasabi.Gui.Helpers;
using WalletWasabi.Logging;
namespace WalletWasabi.Gui.Controls
@@ -41,7 +40,12 @@ namespace WalletWasabi.Gui.Controls
SaveCommand.ThrownExceptions
.ObserveOn(RxApp.TaskpoolScheduler)
- .Subscribe(ex => Logger.LogError(ex));
+ .Subscribe(ex =>
+ {
+ // The error is thrown also in ReceiveTabViewModel -> SaveQRCodeCommand.ThrownExceptions.
+ // However we need to catch it here too but to avoid duplicate logging the following line commented out.
+ // Logger.LogWarning(ex);
+ });
}
public async Task<Unit> SaveQRCodeAsync(string address)
@@ -69,19 +73,12 @@ namespace WalletWasabi.Gui.Controls
path = $"{path}.png";
}
- try
- {
var pixSize = PixelSize.FromSize(CoercedSize, 1);
using var rtb = new RenderTargetBitmap(pixSize);
rtb.Render(this);
rtb.Save(path);
}
- catch (Exception ex)
- {
- Logger.LogDebug(ex);
- }
- }
return Unit.Default;
}

Display error on Save Qr code fail.