restore item selection
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Receive/AddressViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Receive/AddressViewModel.cs
@@ -15,6 +15,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Receive
public AddressViewModel(HdPubKey model, Network network, Func<HdPubKey, string, Task> hideCommand)
{
+ Model = model;
_address = model.GetP2wpkhAddress(network).ToString();
_label = model.Label;
@@ -22,6 +23,8 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Receive
HideAddressCommand = ReactiveCommand.CreateFromTask(async () => await hideCommand.Invoke(model, Address));
}
+ public HdPubKey Model { get; }
+
public ICommand CopyAddressCommand { get; }
public ICommand HideAddressCommand { get; }

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Receive/ReceiveAddressesViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Receive/ReceiveAddressesViewModel.cs
@@ -20,7 +20,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Receive
public partial class ReceiveAddressesViewModel : RoutableViewModel
{
[AutoNotify] private ObservableCollection<AddressViewModel> _addresses;
- [AutoNotify] private HdPubKey? _selectedAddress;
+ [AutoNotify] private AddressViewModel? _selectedAddress;
public ReceiveAddressesViewModel(Wallet wallet)
{
@@ -39,7 +39,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Receive
return;
}
- Navigate().To(new ReceiveAddressViewModel(selected, wallet.Network, wallet.KeyManager.MasterFingerprint, wallet.KeyManager.IsHardwareWallet));
+ Navigate().To(new ReceiveAddressViewModel(selected.Model, wallet.Network, wallet.KeyManager.MasterFingerprint, wallet.KeyManager.IsHardwareWallet));
SelectedAddress = null;
});
}

MODIFY
WalletWasabi.Fluent/Views/Wallets/Receive/ReceiveAddressesView.axaml
WalletWasabi.Fluent/Views/Wallets/Receive/ReceiveAddressesView.axaml
EnableBack="True"
EnableCancel="True">
<DataGrid Items="{Binding Addresses}"
+ SelectedItem="{Binding SelectedAddress, Mode=TwoWay}"
CanUserSortColumns="True">
- <!-- SelectedItem="{Binding SelectedAddress, Mode=TwoWay}" -->
<DataGrid.Styles>
<Style Selector="Button.addressActionButton">
<Setter Property="DockPanel.Dock" Value="Right"/>

restore item selection