say open wallet instead of login
MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/HardwareWallet/ConnectHardwareWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/HardwareWallet/ConnectHardwareWalletViewModel.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
using System.Timers;
using System.Windows.Input;
using ReactiveUI;
-using WalletWasabi.Fluent.ViewModels.Login;
+using WalletWasabi.Fluent.ViewModels.NavBar;
using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.Fluent.ViewModels.Wallets;
using WalletWasabi.Hwi.Models;
@@ -27,7 +27,6 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet.HardwareWallet
WalletName = walletName;
WalletManager = walletManager;
Wallets = wallets;
- HardwareWalletOperations = new HardwareWalletOperations(walletManager);
NextCommand = ReactiveCommand.Create(RunDetection);
@@ -37,13 +36,14 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet.HardwareWallet
NavigateToExistingWalletLoginCommand = ReactiveCommand.Create(() =>
{
- if (ExistingWallet is null)
- {
- return;
- }
+ var navBar = NavigationManager.Get<NavBarViewModel>();
+ if (ExistingWallet is { } && navBar is { })
+ {
+ navBar.SelectedItem = ExistingWallet;
Navigate().Clear();
- Navigate(NavigationTarget.HomeScreen).To(new LoginViewModel(ExistingWallet), NavigationMode.Clear);
+ ExistingWallet.OpenCommand.Execute(default);
+ }
});
}
@@ -55,7 +55,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet.HardwareWallet
public WalletViewModelBase? ExistingWallet { get; set; }
- public HardwareWalletOperations HardwareWalletOperations { get; }
+ public HardwareWalletOperations HardwareWalletOperations { get; set; }
public ICommand OpenBrowserCommand { get; }
@@ -96,7 +96,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet.HardwareWallet
if (WalletManager.WalletExists(device.Fingerprint))
{
ExistingWallet = Wallets.FirstOrDefault(x => x.Wallet.KeyManager.MasterFingerprint == device.Fingerprint);
- Message = "The connected hardware wallet is already added to the software, click below to login or click Continue to search again.";
+ Message = "The connected hardware wallet is already added to the software, click below to open it or click Continue to search again.";
ExistingWalletFound = true;
return;
}
@@ -141,6 +141,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet.HardwareWallet
{
base.OnNavigatedTo(inStack, disposable);
+ HardwareWalletOperations = new HardwareWalletOperations(WalletManager);
HardwareWalletOperations.DetectionCompleted += OnDetectionCompleted;
HardwareWalletOperations.PassphraseTimer.Elapsed += OnPassphraseNeeded;

MODIFY
WalletWasabi.Fluent/Views/AddWallet/HardwareWallet/ConnectHardwareWalletView.axaml
WalletWasabi.Fluent/Views/AddWallet/HardwareWallet/ConnectHardwareWalletView.axaml
<Panel HorizontalAlignment="Center" VerticalAlignment="Center">
<DockPanel>
<TextBlock Text="{Binding Message}" TextWrapping="Wrap" TextAlignment="Center" DockPanel.Dock="Top"/>
- <Button IsVisible="{Binding ExistingWalletFound}" Margin="0 15 0 0" Command="{Binding NavigateToExistingWalletLoginCommand}" Content="Click here to login" Classes="h7 plain activeHyperLink" HorizontalAlignment="Center" VerticalAlignment="Bottom" DockPanel.Dock="Bottom"/>
+ <Button IsVisible="{Binding ExistingWalletFound}" Margin="0 15 0 0" Command="{Binding NavigateToExistingWalletLoginCommand}" Content="Open wallet" Classes="h7 plain activeHyperLink" HorizontalAlignment="Center" VerticalAlignment="Bottom" DockPanel.Dock="Bottom"/>
</DockPanel>
<c:ProgressRing IsVisible="{Binding IsSearching}" Margin="15" IsIndeterminate="True" Height="100" Width="100" />
</Panel>

say open wallet instead of login