first things
MODIFY
WalletWasabi.Fluent/ViewModels/AddWalletPageViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWalletPageViewModel.cs
@@ -35,6 +35,12 @@ namespace WalletWasabi.Fluent.ViewModels
NavigateTo(new RecoverWalletViewModel(navigationState, WalletName, network, walletManager), NavigationTarget.DialogScreen);
});
+ ConnectHardwareWalletCommand = ReactiveCommand.CreateFromTask(async () =>
+ {
+ await navigationState.DialogScreen.Invoke().Router.Navigate.Execute(
+ new ConnectHardwareWalletViewModel(navigationState, network, walletManager));
+ });
+
CreateWalletCommand = ReactiveCommand.CreateFromTask(
async () =>
{
@@ -116,5 +122,6 @@ namespace WalletWasabi.Fluent.ViewModels
public ICommand CreateWalletCommand { get; }
public ICommand RecoverWalletCommand { get; }
+ public ICommand ConnectHardwareWalletCommand { get; }
}
}
\ No newline at end of file

ADD
WalletWasabi.Fluent/Views/AddWallet/ConnectHardwareWalletView.axaml
+<UserControl xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:c="clr-namespace:WalletWasabi.Fluent.Controls"
+ mc:Ignorable="d"
+ d:DesignWidth="600" d:DesignHeight="500"
+ x:Class="WalletWasabi.Fluent.Views.AddWallet.ConnectHardwareWalletView">
+ <c:ContentArea Title="Hardware wallet"
+ Caption="The hardware wallet will automatically appear when connected to the computer."
+ EnableCancel="True" CancelContent="Cancel"
+ EnableBack="True"
+ EnableNext="True" NextContent="Connect" >
+ <DockPanel>
+
+ <StackPanel Spacing="8" DockPanel.Dock="Bottom" Margin="0 40 0 40">
+ <StackPanel>
+ <TextBlock Text="Limitations?" FontWeight="Bold" />
+ <TextBlock Text="- Currently all hardware wallets are incompatible with coinjoins." />
+ <TextBlock Text="- Only bech32 keypaths are supported, your legacy hardware wallet transactions won't show up." />
+ </StackPanel>
+ <StackPanel>
+ <TextBlock Text="Which hardware wallets are supported?" FontWeight="Bold" />
+ <TextBlock Text="- Coldcard and Ledger Nano S." TextWrapping="Wrap" />
+ <TextBlock Text="- While other hardware wallets may work, they were not tested by Wasabi developers." TextWrapping="Wrap" />
+ </StackPanel>
+ </StackPanel>
+
+ <ListBox Items="{Binding HardwareWallets}" SelectedItem="{Binding SelectedHardwareWallet}">
+
+ </ListBox>
+
+ </DockPanel>
+ </c:ContentArea>
+</UserControl>
\ No newline at end of file

ADD
WalletWasabi.Fluent/Views/AddWallet/ConnectHardwareWalletView.axaml.cs
+using Avalonia.Markup.Xaml;
+using Avalonia.ReactiveUI;
+using WalletWasabi.Fluent.ViewModels.AddWallet;
+
+namespace WalletWasabi.Fluent.Views.AddWallet
+{
+ public class ConnectHardwareWalletView : ReactiveUserControl<ConnectHardwareWalletViewModel>
+ {
+ public ConnectHardwareWalletView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/AddWalletPageView.axaml
WalletWasabi.Fluent/Views/AddWalletPageView.axaml
</StackPanel>
</Button>
- <Button Classes="option">
+ <Button Classes="option" Command="{Binding ConnectHardwareWalletCommand}">
<StackPanel Orientation="Horizontal">
<PathIcon DockPanel.Dock="Left" Margin="20" Data="{StaticResource web_asset_regular}"
Width="16" VerticalAlignment="Center" />

MODIFY
WalletWasabi.Fluent/WalletWasabi.Fluent.csproj
WalletWasabi.Fluent/WalletWasabi.Fluent.csproj
<SubType>Designer</SubType>
</AvaloniaResource>
<AvaloniaResource Include="Assets\**" />
+ <Compile Update="Views\AddWallet\ConnectHardwareWalletView.axaml.cs">
+ <DependentUpon>ConnectHardwareWalletView.axaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.999-cibuild0011763-beta" />

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/HardwareWallets/HardwareWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/HardwareWallets/HardwareWalletViewModel.cs
@@ -42,5 +42,12 @@ namespace WalletWasabi.Gui.Tabs.WalletManager.HardwareWallets
{
return WalletName;
}
+
+ public override bool Equals(object? obj)
+ {
+ return obj is HardwareWalletViewModel otherWallet &&
+ otherWallet.HardwareWalletInfo.Fingerprint == HardwareWalletInfo.Fingerprint &&
+ otherWallet.HardwareWalletInfo.Model == HardwareWalletInfo.Model;
+ }
}
}

first things