Remove unecessary Task.Run
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Receive/ReceiveAddressViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Receive/ReceiveAddressViewModel.cs
@@ -84,14 +84,13 @@ public partial class ReceiveAddressViewModel : RoutableViewModel
return;
}
- await Task.Run(async () =>
- {
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(60));
try
{
var client = new HwiClient(network);
await client.DisplayAddressAsync(masterFingerprint.Value, model.FullKeyPath, cts.Token);
+ throw new Exception();
}
catch (FormatException ex) when (ex.Message.Contains("network") && network == Network.TestNet)
{
@@ -103,8 +102,7 @@ public partial class ReceiveAddressViewModel : RoutableViewModel
Logger.LogError(ex);
var exMessage = cts.IsCancellationRequested ? "User response didn't arrive in time." : ex.ToUserFriendlyString();
await ShowErrorAsync(Title, exMessage, "Unable to send the address to the device");
- }
- });
+ };
}
private async Task OnSaveQrCodeAsync()

Remove unecessary Task.Run