Privacy Ring References
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/PrivacyRing/PrivacyRingItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/PrivacyRing/PrivacyRingItemViewModel.cs
@@ -27,6 +27,21 @@ public class PrivacyRingItemViewModel : IPrivacyRingPreviewItem, IDisposable
AmountText = $"{Coin.Amount.ToFormattedString()} BTC";
Unconfirmed = !coin.Confirmed;
Confirmations = coin.GetConfirmations();
+
+ Reference =
+ this switch
+ {
+ { IsPrivate: true } => "Private",
+ { IsSemiPrivate: true } => "Semi private",
+ { IsNonPrivate: true } => "Non private",
+ _ => ""
+ };
+
+ Reference += " coin";
+ if (Unconfirmed)
+ {
+ Reference += " (unconfirmed)";
+ }
}
public PrivacyRingItemViewModel(PrivacyRingViewModel parent, Pocket pocket, double start, double end)
@@ -40,6 +55,17 @@ public class PrivacyRingItemViewModel : IPrivacyRingPreviewItem, IDisposable
IsNonPrivate = !IsPrivate && !IsSemiPrivate;
AmountText = $"{pocket.Amount.ToFormattedString()} BTC";
Unconfirmed = false;
+
+ Reference =
+ this switch
+ {
+ { IsPrivate: true } => "Private",
+ { IsSemiPrivate: true } => "Semi private",
+ { IsNonPrivate: true } => "Non private",
+ _ => ""
+ };
+
+ Reference += " coins";
}
public WalletCoinViewModel? Coin { get; }
@@ -54,6 +80,7 @@ public class PrivacyRingItemViewModel : IPrivacyRingPreviewItem, IDisposable
public string AmountText { get; }
public bool Unconfirmed { get; }
public int Confirmations { get; }
+ public string Reference { get; }
private PathGeometry CreateGeometry(double start, double end, double outerRadius)
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/PrivacyRing/PrivacyRingViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/PrivacyRing/PrivacyRingViewModel.cs
@@ -75,6 +75,7 @@ public partial class PrivacyRingViewModel : RoutableViewModel
public PrivacyControlTileViewModel PrivacyTile { get; }
public ObservableCollectionExtended<PrivacyRingItemViewModel> Items { get; } = new();
+ public ObservableCollectionExtended<PrivacyRingItemViewModel> References { get; } = new();
public ObservableCollectionExtended<IPrivacyRingPreviewItem> PreviewItems { get; } = new();
public Wallet Wallet { get; }
@@ -113,6 +114,16 @@ public partial class PrivacyRingViewModel : RoutableViewModel
PreviewItems.RemoveRange(1, PreviewItems.Count - 1);
PreviewItems.AddRange(list);
+
+ References.Clear();
+
+ var references =
+ list.GroupBy(x => (x.IsPrivate, x.IsNonPrivate, x.IsSemiPrivate, x.Unconfirmed))
+ .Select(x => x.First())
+ .OrderBy(list.IndexOf)
+ .ToList();
+
+ References.AddRange(references);
}
private IEnumerable<PrivacyRingItemViewModel> CreateCoinSegments(IEnumerable<Pocket> pockets)

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/PrivacyRing/PrivacyRingView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/PrivacyRing/PrivacyRingView.axaml
Caption="Hover over the ring segments to see coin details"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
+ <DockPanel>
+
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" HorizontalAlignment="Left" Margin="2">
+ <TextBlock Text="References:" Classes="h8" VerticalAlignment="Center" Margin="2" />
+ <ItemsControl Items="{Binding References}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <WrapPanel Orientation="Horizontal" />
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Orientation="Horizontal">
+ <Path Classes.private="{Binding IsPrivate}"
+ Classes.semiPrivate="{Binding IsSemiPrivate}"
+ Classes.nonPrivate="{Binding IsNonPrivate}"
+ Classes.unconfirmed="{Binding Unconfirmed}"
+ VerticalAlignment="Center" Margin="5 2 0 0"
+ IsHitTestVisible="False">
+ <Path.Data>
+ <EllipseGeometry RadiusX="5" RadiusY="5" Center="2.5,2.5" />
+ </Path.Data>
+ </Path>
+ <TextBlock Text="{Binding Reference}" Margin="5" Classes="h8" VerticalAlignment="Center" Opacity="0.6" />
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+
<Panel x:Name="Panel">
<i:Interaction.Behaviors>
<behaviors:BoundsObserverBehavior Bounds="{Binding #Panel.Bounds, Mode=OneWay}"
</Carousel.DataTemplates>
</Carousel>
</Panel>
+ </DockPanel>
</c:ContentArea>
</UserControl>

Privacy Ring References