Lock receive address
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabView.xaml
<DrawingPresenter HorizontalAlignment="Left" Height="16" Width="16" Stretch="Fill" Drawing="{StaticResource ReceiveTabView_IsHardwareWallet}" />
</MenuItem.Icon>
</MenuItem>
+ <MenuItem Header="Hide Address" Command="{Binding LockAddress}">
+ <MenuItem.Icon>
+ <DrawingPresenter HorizontalAlignment="Left" Height="16" Width="16" Stretch="Fill" Drawing="{StaticResource ReceiveTabView_LockAddress}" />
+ </MenuItem.Icon>
+ </MenuItem>
</ContextMenu>
</Grid.ContextMenu>
<Expander Name="coinExpander" ExpandDirection="Down" IsExpanded="{Binding IsExpanded}" Classes="coloredExpander" Background="{Binding ElementName=coinExpander, Path=IsExpanded, Converter={StaticResource CoinItemExpanderColorConverter}}">

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabViewModel.cs
@@ -92,7 +92,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public ReactiveCommand<Unit, Unit> GenerateCommand { get; }
- private WalletService WalletService { get; }
+ public WalletService WalletService { get; }
public SuggestLabelViewModel LabelSuggestion { get; }
@@ -121,7 +121,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
set => this.RaiseAndSetIfChanged(ref _selectedAddress, value);
}
- private void InitializeAddresses()
+ public void InitializeAddresses()
{
try
{

MODIFY
WalletWasabi.Gui/Icons/Icons.xaml
WalletWasabi.Gui/Icons/Icons.xaml
<DrawingGroup x:Key="ReceiveTabView_IsHardwareWallet">
<GeometryDrawing Brush="#22B14C" Geometry="F1 M 23.5,45.5L 30,52L 40.5,41.5L 44,45L 30,59L 20,49L 23.5,45.5 Z M 20,17L 43.25,17L 56,29.75L 56,59L 32,59L 36,55L 52,55L 52,34L 39,34L 39,21L 24,21L 24,43L 20,47L 20,17 Z M 20,59L 20,51L 28,59L 20,59 Z M 43,22.25L 43,30L 50.75,30L 43,22.25 Z" />
</DrawingGroup>
+ <DrawingGroup x:Key="ReceiveTabView_LockAddress">
+ <DrawingGroup.Children>
+ <GeometryDrawing Brush="#22B14C" Geometry="F1 M 199.101,178.744C 199.101,144.804 212.44,126.3 239.028,126.3L 258.284,126.3C 284.861,126.3 299.199,144.804 299.199,178.744L 299.199,226.156L 344.185,226.156L 344.185,163.772C 344.185,121.54 308.749,87.3026 265.032,87.3026L 233.389,87.3026C 189.669,87.3026 154.232,121.54 154.232,163.772L 154.232,226.156L 199.101,226.156L 199.101,178.744 Z " />
+ <GeometryDrawing Brush="#22B14C" Geometry="M 116.809,259.988C 116.809,241.26 132.231,226.079 151.252,226.079L 343.464,226.079C 362.484,226.079 377.905,241.26 377.905,259.988L 377.905,394.825C 377.905,413.552 362.484,428.735 343.464,428.735L 151.252,428.735C 132.231,428.735 116.809,413.552 116.809,394.825L 116.809,259.988 Z " />
+ <GeometryDrawing Geometry="M 124.839,264.876C 124.839,247.523 139.352,233.455 157.255,233.455L 338.176,233.455C 356.079,233.455 370.592,247.523 370.592,264.876L 370.592,389.823C 370.592,407.177 356.079,421.245 338.176,421.245L 157.255,421.245C 139.352,421.245 124.839,407.177 124.839,389.823L 124.839,264.876 Z " />
+ <GeometryDrawing Geometry="F1 M 194.653,177.156C 194.653,143.216 212.453,122.945 239.041,122.945L 258.701,122.945C 285.281,122.945 302.769,142.267 302.769,176.208L 302.769,225.607L 340.736,225.607L 340.736,162.541C 338.808,122.629 306.303,91.64 265.125,91.324L 233.583,91.008C 188.872,92.9054 158.615,125.475 157.651,161.277L 157.651,225.607L 194.653,225.607L 194.653,177.156 Z " />
+ <GeometryDrawing Brush="#22B14C" Geometry="F1 M 207.713,315.593C 207.713,297.211 224.629,282.308 245.497,282.308C 266.364,282.308 283.281,297.211 283.281,315.593C 283.281,326.521 277.305,336.217 268.076,342.287L 268.076,390.049L 222.919,390.049L 222.919,342.287C 213.689,336.217 207.713,326.521 207.713,315.593 Z " />
+ <GeometryDrawing Geometry="F1 M 218.509,317.193C 218.509,303.792 230.841,292.928 246.053,292.928C 261.265,292.928 273.597,303.792 273.597,317.193C 273.597,325.159 269.241,332.228 262.513,336.651L 262.513,382.861L 229.593,382.861L 229.593,336.651C 222.865,332.228 218.509,325.159 218.509,317.193 Z " />
+ <GeometryDrawing Geometry="F1 M 124.48,345.641L 124.48,264.959C 124.48,247.605 138.995,233.536 156.899,233.536L 337.817,233.536C 355.721,233.536 370.235,247.605 370.235,264.959L 370.319,271.737C 255.635,269.681 173.687,294.316 124.48,345.641 Z " />
+ </DrawingGroup.Children>
+ </DrawingGroup>
<!-- Anonymity icons -->
<DrawingGroup x:Key="PrivacyCritical">
<DrawingGroup.Children>

MODIFY
WalletWasabi.Gui/ViewModels/AddressViewModel.cs
WalletWasabi.Gui/ViewModels/AddressViewModel.cs
using Avalonia;
+using AvalonStudio.Extensibility;
+using AvalonStudio.Shell;
using Gma.QrCodeNet.Encoding;
using ReactiveUI;
using Splat;
@@ -36,6 +38,7 @@ namespace WalletWasabi.Gui.ViewModels
public ReactiveCommand<Unit, Unit> CopyLabel { get; }
public ReactiveCommand<Unit, bool> ChangeLabel { get; }
public ReactiveCommand<Unit, Unit> DisplayAddressOnHw { get; }
+ public ReactiveCommand<Unit, Unit> LockAddress { get; }
public HdPubKey Model { get; }
private Global Global { get; }
@@ -123,6 +126,18 @@ namespace WalletWasabi.Gui.ViewModels
}
});
+ LockAddress = ReactiveCommand.CreateFromTask(async () =>
+ {
+ Model.SetKeyState(KeyState.Locked, km);
+ IoC.Get<IShell>().Documents?.OfType<ReceiveTabViewModel>()?.FirstOrDefault(x => x.WalletService.KeyManager == KeyManager).InitializeAddresses();
+
+ bool isAddressCopied = await Application.Current.Clipboard.GetTextAsync() == Address;
+ if (isAddressCopied)
+ {
+ await Application.Current.Clipboard.ClearAsync();
+ }
+ });
+
Observable
.Merge(ToggleQrCode.ThrownExceptions)
.Merge(SaveQRCode.ThrownExceptions)
@@ -130,6 +145,7 @@ namespace WalletWasabi.Gui.ViewModels
.Merge(CopyLabel.ThrownExceptions)
.Merge(ChangeLabel.ThrownExceptions)
.Merge(DisplayAddressOnHw.ThrownExceptions)
+ .Merge(LockAddress.ThrownExceptions)
.Subscribe(ex =>
{
Logger.LogError(ex);

Lock receive address