Add DisplayAddress on HW to receive tab items.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabView.xaml
<controls:GroupBox Title="{Binding Title}" TextBlock.FontSize="30" Padding="20" Margin="10">
<Grid Classes="content">
<DockPanel LastChildFill="True">
+ <StackPanel DockPanel.Dock="Bottom">
+ <TextBlock Text="{Binding WarningMessage}" Classes="warningMessage" />
+ <TextBlock Text="{Binding SuccessMessage}" Classes="validationMessage" Foreground="Green" />
+ </StackPanel>
<Grid RowDefinitions="Auto,*" DockPanel.Dock="Top">
<DockPanel LastChildFill="True">
<Grid ColumnDefinitions="*,300" DockPanel.Dock="Top" Margin="0 0 0 10">
<Path HorizontalAlignment="Left" Data="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z" Height="16" Width="16" Stretch="Fill" Fill="#22B14C" />
</MenuItem.Icon>
</MenuItem>
+ <MenuItem IsVisible="{Binding IsHardwareWallet}" Header="Display address on HardwareWallet" Command="{Binding DisplayAddressOnHwCommand}">
+ <MenuItem.Icon>
+ <Path HorizontalAlignment="Left" Data="M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z" Height="16" Width="16" Stretch="Fill" Fill="#22B14C" />
+ </MenuItem.Icon>
+ </MenuItem>
</ContextMenu>
</controls:ExtendedListBox.ContextMenu>
<controls:ExtendedListBox.ItemTemplate>

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabViewModel.cs
@@ -9,9 +9,11 @@ using System.Linq;
using System.Reactive;
using System.Reactive.Disposables;
using System.Reactive.Linq;
+using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Gui.Tabs.WalletManager;
using WalletWasabi.Gui.ViewModels;
+using WalletWasabi.Hwi2;
using WalletWasabi.KeyManagement;
namespace WalletWasabi.Gui.Controls.WalletExplorer
@@ -33,6 +35,10 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public ReactiveCommand<Unit, Unit> ShowQrCode { get; }
public ReactiveCommand<Unit, Unit> ChangeLabelCommand { get; }
+ public ReactiveCommand<Unit, Unit> DisplayAddressOnHwCommand { get; }
+
+ public ReactiveCommand<Unit, Unit> GenerateCommand { get; }
+
public ReceiveTabViewModel(WalletViewModel walletViewModel)
: base("Receive", walletViewModel)
{
@@ -128,7 +134,26 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
SelectedAddress.InEditMode = true;
});
+ DisplayAddressOnHwCommand = ReactiveCommand.CreateFromTask(async () =>
+ {
+ var client = new HwiClient(Global.Network);
+ using (var cts = new CancellationTokenSource(TimeSpan.FromSeconds(60)))
+ {
+ await client.DisplayAddressAsync(KeyManager.MasterFingerprint.Value, KeyManager.AccountKeyPath, cts.Token);
+ }
+ });
+
_suggestions = new ObservableCollection<SuggestionViewModel>();
+
+ Observable.Merge(DisplayAddressOnHwCommand.ThrownExceptions)
+ .Merge(ChangeLabelCommand.ThrownExceptions)
+ .Merge(ShowQrCode.ThrownExceptions)
+ .Merge(CopyAddress.ThrownExceptions)
+ .Merge(CopyLabel.ThrownExceptions)
+ .Subscribe((ex) =>
+ {
+ SetWarningMessage(ex.ToTypeMessageString());
+ });
}
public override void OnOpen()
@@ -262,7 +287,5 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
Suggestions.Clear();
}
-
- public ReactiveCommand<Unit, Unit> GenerateCommand { get; }
}
}

Add DisplayAddress on HW to receive tab items.