async creation of HW wallet with indication.
MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/ConnectHardwareWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/ConnectHardwareWalletViewModel.cs
@@ -125,15 +125,20 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
try
{
- // TODO: Progress ring
+ IsBusy = true;
await StopDetection();
+ var newWallet = await Task.Run(async () =>
+ {
var fingerPrint = (HDFingerprint)SelectedHardwareWallet.HardwareWalletInfo.Fingerprint;
using var cts = new CancellationTokenSource(TimeSpan.FromMinutes(3));
var extPubKey = await HwiClient.GetXpubAsync(SelectedHardwareWallet.HardwareWalletInfo.Model, SelectedHardwareWallet.HardwareWalletInfo.Path, KeyManager.DefaultAccountKeyPath, cts.Token);
var path = WalletManager.WalletDirectories.GetWalletFilePaths(WalletName).walletFilePath;
- WalletManager.AddWallet(KeyManager.CreateNewHardwareWalletWatchOnly(fingerPrint, extPubKey, path));
+ return KeyManager.CreateNewHardwareWalletWatchOnly(fingerPrint, extPubKey, path);
+ });
+
+ WalletManager.AddWallet(newWallet);
// Close dialog
ClearNavigation();
@@ -146,6 +151,10 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
// Restart detection
StartDetection();
}
+ finally
+ {
+ IsBusy = false;
+ }
}
private async Task StopDetection()

MODIFY
WalletWasabi.Fluent/Views/AddWallet/ConnectHardwareWalletView.axaml
WalletWasabi.Fluent/Views/AddWallet/ConnectHardwareWalletView.axaml
</UserControl.Styles>
<c:ContentArea Title="Connect Hardware Wallet"
+ IsBusy="{Binding IsBusy}"
EnableCancel="True" CancelContent="Cancel"
EnableBack="True"
EnableNext="True" NextContent="Connect" >

async creation of HW wallet with indication.