use pngs for full colour hardware wallet graphics.
ADD
WalletWasabi.Fluent/Assets/HardwareIcons/coldcard.png
WalletWasabi.Fluent/Assets/HardwareIcons/coldcard.png
Binary files /dev/null and b/WalletWasabi.Fluent/Assets/HardwareIcons/coldcard.png differ

ADD
WalletWasabi.Fluent/Assets/HardwareIcons/generic.png
WalletWasabi.Fluent/Assets/HardwareIcons/generic.png
Binary files /dev/null and b/WalletWasabi.Fluent/Assets/HardwareIcons/generic.png differ

ADD
WalletWasabi.Fluent/Assets/HardwareIcons/ledger.png
WalletWasabi.Fluent/Assets/HardwareIcons/ledger.png
Binary files /dev/null and b/WalletWasabi.Fluent/Assets/HardwareIcons/ledger.png differ

ADD
WalletWasabi.Fluent/Assets/HardwareIcons/trezor.png
WalletWasabi.Fluent/Assets/HardwareIcons/trezor.png
Binary files /dev/null and b/WalletWasabi.Fluent/Assets/HardwareIcons/trezor.png differ

MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/ConnectHardwareWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/ConnectHardwareWalletViewModel.cs
@@ -16,6 +16,7 @@ using WalletWasabi.Hwi;
using WalletWasabi.Hwi.Models;
using WalletWasabi.Logging;
using WalletWasabi.Wallets;
+using WalletWasabi.Fluent.ViewModels.Navigation;
using HardwareWalletViewModel = WalletWasabi.Gui.Tabs.WalletManager.HardwareWallets.HardwareWalletViewModel;
namespace WalletWasabi.Fluent.ViewModels.AddWallet
@@ -39,7 +40,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
this.WhenAnyValue(x => x.SelectedHardwareWallet)
.ObserveOn(RxApp.MainThreadScheduler)
.Select(x => x?.HardwareWalletInfo.Fingerprint is { } && x.HardwareWalletInfo.IsInitialized());
- NextCommand = ReactiveCommand.Create(ConnectSelectedHardwareWallet,nextCommandIsExecute);
+ NextCommand = ReactiveCommand.CreateFromTask(ConnectSelectedHardwareWalletAsync, nextCommandIsExecute);
this.WhenAnyValue(x => x.SelectedHardwareWallet)
.ObserveOn(RxApp.MainThreadScheduler)
@@ -116,7 +117,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
public ReactiveCommand<string, Unit> OpenBrowserCommand { get; }
- private async void ConnectSelectedHardwareWallet()
+ private async Task ConnectSelectedHardwareWalletAsync()
{
if (SelectedHardwareWallet?.HardwareWalletInfo.Fingerprint is null)
{
@@ -126,7 +127,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
try
{
IsBusy = true;
- await StopDetection();
+ await StopDetectionAsync();
var newWallet = await Task.Run(async () =>
{
@@ -157,7 +158,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
}
}
- private async Task StopDetection()
+ private async Task StopDetectionAsync()
{
if (DetectionTask is { } task && DetectionCts is { } cts)
{
@@ -202,6 +203,11 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
HardwareWallets.RemoveMany(toRemove);
// Add newly detected hardware wallets
HardwareWallets.AddRange(toAdd);
+
+ if(SelectedHardwareWallet is null)
+ {
+ SelectedHardwareWallet = HardwareWallets.FirstOrDefault();
+ }
}, RxApp.MainThreadScheduler);
}

MODIFY
WalletWasabi.Fluent/Views/AddWallet/ConnectHardwareWalletView.axaml
WalletWasabi.Fluent/Views/AddWallet/ConnectHardwareWalletView.axaml
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:c="clr-namespace:WalletWasabi.Fluent.Controls"
xmlns:h="using:WalletWasabi.Fluent.Helpers"
+ xmlns:conv="using:WalletWasabi.Fluent.Converters"
xmlns:svg="clr-namespace:Svg.Skia.Avalonia;assembly=Svg.Skia.Avalonia"
mc:Ignorable="d"
d:DesignWidth="600" d:DesignHeight="500"
x:Class="WalletWasabi.Fluent.Views.AddWallet.ConnectHardwareWalletView">
- <UserControl.Resources>
- <svg:SvgImage x:Key="coldcard" Source="/Assets/HardwareIcons/coldcard.svg" />
- <svg:SvgImage x:Key="ledger" Source="/Assets/HardwareIcons/ledger.svg" />
- <svg:SvgImage x:Key="trezor" Source="/Assets/HardwareIcons/trezor.svg" />
- </UserControl.Resources>
<UserControl.Styles>
<Style Selector="StackPanel.Delay">
</Style>
</UserControl.Styles>
- <c:ContentArea Title="Connect Hardware Wallet"
+ <c:ContentArea Title="Hardware Wallet"
IsBusy="{Binding IsBusy}"
EnableCancel="True" CancelContent="Cancel"
EnableBack="True"
<DockPanel>
<Button DockPanel.Dock="Bottom" HorizontalAlignment="Center" Classes="h8 plain activeHyperLink" Foreground="{DynamicResource SystemAccentColor}" Content="More information and help with Hardware Wallets" />
<Panel>
- <ListBox IsVisible="{Binding WalletListVisible}" Background="Transparent" Items="{Binding HardwareWallets}" SelectedItem="{Binding SelectedHardwareWallet}"/>
+ <ListBox IsVisible="{Binding WalletListVisible}" Background="Transparent" Items="{Binding HardwareWallets}" SelectedItem="{Binding SelectedHardwareWallet}">
+ <ListBox.ItemsPanel>
+ <ItemsPanelTemplate>
+ <WrapPanel Orientation="Horizontal" HorizontalAlignment="Center" />
+ </ItemsPanelTemplate>
+ </ListBox.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Button Classes="plain" Command="{Binding OpenCommand}" Height="200" Width="150" Margin="8">
+ <StackPanel>
+ <Image Source="{Binding Path='.' Converter={x:Static conv:HardwareWalletIconConverter.Instance}}" />
+ <TextBlock Text="{Binding WalletName}" HorizontalAlignment="Center" />
+ </StackPanel>
+ </Button>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ListBox>
<DockPanel IsVisible="{Binding !WalletListVisible}">
- <StackPanel VerticalAlignment="Top" Spacing="20" DockPanel.Dock="Top">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="20">
- <Image Height="100" Source="{DynamicResource coldcard}" />
- <Image Height="100" Source="{DynamicResource trezor}" />
- <Image Height="100" Source="{DynamicResource ledger}" />
+ <StackPanel VerticalAlignment="Top" Spacing="40" DockPanel.Dock="Top" Margin="0 20 0 0">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="40">
+ <Image Height="100" Source="/Assets/HardwareIcons/ledger.png" />
+ <Image Height="100" Source="/Assets/HardwareIcons/coldcard.png" />
+ <Image Height="100" Source="/Assets/HardwareIcons/trezor.png" />
+ <Image Height="100" Source="/Assets/HardwareIcons/generic.png" />
</StackPanel>
<TextBlock Text="Connect your Wallet to the USB Port on your PC and Login / Enter the PIN on the Wallet" HorizontalAlignment="Center" />
</StackPanel>

use pngs for full colour hardware wallet graphics.