add basic information
MODIFY
WalletWasabi.Fluent/Styles/TextBox.axaml
WalletWasabi.Fluent/Styles/TextBox.axaml
</Setter>
</Style>
- <Style Selector="TextBlock.monoSpaced">
- <Setter Property="FontFamily" Value="{StaticResource MonospacedFont}" />
- <Setter Property="FontSize" Value="15" />
+ <Style Selector="TextBlock.monoSpaced, TextBox.monoSpaced">
+ <Setter Property="TextBlock.FontFamily" Value="{StaticResource MonospacedFont}" />
+ <Setter Property="TextBlock.FontSize" Value="15" />
</Style>
<Style Selector="TextBox.wrap /template/ TextPresenter#PART_TextPresenter">

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/CoinJoinDetailsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/CoinJoinDetailsViewModel.cs
+using System.Linq;
+using NBitcoin;
using WalletWasabi.Fluent.ViewModels.Navigation;
+using WalletWasabi.Fluent.ViewModels.Wallets.Home.History.HistoryItems;
namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
{
[NavigationMetaData(Title = "CoinJoin Details")]
public partial class CoinJoinDetailsViewModel : RoutableViewModel
{
- public CoinJoinDetailsViewModel()
+ [AutoNotify] private string _date;
+ [AutoNotify] private string _status;
+ [AutoNotify] private Money? _coinJoinFee;
+ [AutoNotify] private string _transactionIdString;
+
+ public CoinJoinDetailsViewModel(CoinJoinsHistoryItemViewModel coinJoinGroup)
{
+ _date = coinJoinGroup.DateString;
+ _status = coinJoinGroup.IsConfirmed ? "Confirmed" : "Pending";
+ _coinJoinFee = coinJoinGroup.OutgoingAmount;
+
+ var transactionIds = coinJoinGroup.CoinJoinTransactions.Select(x => x.TransactionId);
+ _transactionIdString = string.Join('\n', transactionIds);
+
SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
NextCommand = CancelCommand;
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/CoinJoinsHistoryItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/CoinJoinsHistoryItemViewModel.cs
@@ -11,22 +11,22 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History.HistoryItems
{
public class CoinJoinsHistoryItemViewModel : HistoryItemViewModelBase
{
- private List<TransactionSummary> _coinJoinTransactions;
-
public CoinJoinsHistoryItemViewModel(int orderIndex, TransactionSummary firstItem)
: base(orderIndex, firstItem)
{
- _coinJoinTransactions = new List<TransactionSummary>( );
+ CoinJoinTransactions = new List<TransactionSummary>();
Label = new List<string> { "Privacy Increasement" };
FilteredLabel = new List<string>();
IsCoinJoin = true;
ShowDetailsCommand = ReactiveCommand.Create(() =>
- RoutableViewModel.Navigate(NavigationTarget.DialogScreen).To(new CoinJoinDetailsViewModel()));
+ RoutableViewModel.Navigate(NavigationTarget.DialogScreen).To(new CoinJoinDetailsViewModel(this)));
Add(firstItem);
}
+ public List<TransactionSummary> CoinJoinTransactions { get; private set; }
+
public void Add(TransactionSummary item)
{
if (!item.IsLikelyCoinJoinOutput)
@@ -34,14 +34,14 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History.HistoryItems
throw new InvalidOperationException("Not a coinjoin item!");
}
- _coinJoinTransactions.Add(item);
+ CoinJoinTransactions.Add(item);
Refresh();
}
private void Refresh()
{
- IsConfirmed = _coinJoinTransactions.All(x => x.IsConfirmed());
- Date = _coinJoinTransactions.Last().DateTime.ToLocalTime();
+ IsConfirmed = CoinJoinTransactions.All(x => x.IsConfirmed());
+ Date = CoinJoinTransactions.Last().DateTime.ToLocalTime();
UpdateAmount();
UpdateDateString();
}
@@ -53,7 +53,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History.HistoryItems
throw new InvalidOperationException("Not the same type!");
}
- _coinJoinTransactions = coinJoinHistoryItemViewModel._coinJoinTransactions;
+ CoinJoinTransactions = coinJoinHistoryItemViewModel.CoinJoinTransactions;
UpdateAmount();
base.Update(item);
@@ -61,8 +61,8 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History.HistoryItems
protected void UpdateDateString()
{
- var firstDate = _coinJoinTransactions.First().DateTime.ToLocalTime();
- var lastDate = _coinJoinTransactions.Last().DateTime.ToLocalTime();
+ var firstDate = CoinJoinTransactions.First().DateTime.ToLocalTime();
+ var lastDate = CoinJoinTransactions.Last().DateTime.ToLocalTime();
DateString = firstDate.Day == lastDate.Day
? $"{firstDate:MM/dd/yyyy}"
@@ -71,7 +71,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History.HistoryItems
private void UpdateAmount()
{
- OutgoingAmount = _coinJoinTransactions.Sum(x => x.Amount) * -1;
+ OutgoingAmount = CoinJoinTransactions.Sum(x => x.Amount) * -1;
}
public void SetBalance(Money balance)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/HistoryItemViewModelBase.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/HistoryItemViewModelBase.cs
@@ -14,7 +14,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History.HistoryItems
[AutoNotify] private bool _isFlashing;
[AutoNotify] private int _orderIndex;
[AutoNotify] private DateTimeOffset _date;
- [AutoNotify] private string? _dateString;
+ [AutoNotify] private string _dateString = "";
[AutoNotify] private bool _isConfirmed;
protected HistoryItemViewModelBase(int orderIndex, TransactionSummary transactionSummary)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionDetailsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionDetailsViewModel.cs
@@ -5,13 +5,11 @@ using System.Reactive.Disposables;
using System.Threading.Tasks;
using System.Windows.Input;
using Avalonia;
-using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.Transactions;
using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.Models;
-using WalletWasabi.Stores;
using WalletWasabi.Wallets;
namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/CoinJoinDetailsView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/CoinJoinDetailsView.axaml
<c:ContentArea Title="{Binding Title}"
NextContent="Done" EnableNext="True"
EnableCancel="{Binding EnableCancel}">
+ <StackPanel Spacing="15">
+ <!-- Date -->
+ <c:PreviewItem Icon="{StaticResource timer_regular}"
+ Text="Date"
+ CopyParameter="{Binding Date}">
+ <TextBox Classes="selectableTextBlock" Text="{Binding Date}" />
+ </c:PreviewItem>
+
+ <Separator />
+
+ <!-- Transaction IDs -->
+ <c:PreviewItem Icon="{StaticResource transaction_id}"
+ Text="Transaction ID">
+ <c:PrivacyContentControl NumberOfPrivacyChars="48">
+ <TextBox Classes="selectableTextBlock monoSpaced" Text="{Binding TransactionIdString}" />
+ </c:PrivacyContentControl>
+ </c:PreviewItem>
+
+ <Separator />
+
+ <!-- Status -->
+ <c:PreviewItem Icon="{StaticResource status_regular}"
+ Text="Status">
+ <TextBox Classes="selectableTextBlock" Text="{Binding Status}" />
+ </c:PreviewItem>
+
+ <Separator />
+
+ <!-- CJ fee -->
+ <c:PreviewItem Icon="{StaticResource btc_logo}"
+ Text="Amount"
+ CopyParameter="{Binding CoinJoinFee}">
+ <TextBox Classes="selectableTextBlock" Text="{Binding CoinJoinFee, StringFormat={}{0} BTC}" />
+ </c:PreviewItem>
+
+ </StackPanel>
</c:ContentArea>
</UserControl>

add basic information