add basic transaction details view structure
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItemViewModel.cs
using System;
using NBitcoin;
+using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.Transactions;
using WalletWasabi.Models;
using WalletWasabi.Stores;
@@ -14,9 +15,11 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
IsCoinJoin = transactionSummary.IsLikelyCoinJoinOutput;
OrderIndex = orderIndex;
Balance = balance;
-
- var confirmations = transactionSummary.Height.Type == HeightType.Chain ? (int) bitcoinStore.SmartHeaderChain.TipHeight - transactionSummary.Height.Value + 1 : 0;
- IsConfirmed = confirmations > 0;
+ Labels = transactionSummary.Label;
+ TransactionId = transactionSummary.TransactionId.ToString();
+ BlockHeight = transactionSummary.Height.Type == HeightType.Chain ? transactionSummary.Height.Value : 0;
+ Confirmations = transactionSummary.Height.Type == HeightType.Chain ? (int) bitcoinStore.SmartHeaderChain.TipHeight - transactionSummary.Height.Value + 1 : 0;
+ IsConfirmed = Confirmations > 0;
var amount = transactionSummary.Amount;
if (amount < 0)
@@ -29,6 +32,14 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
}
}
+ public int Confirmations { get; }
+
+ public int BlockHeight { get; }
+
+ public string TransactionId { get; set; }
+
+ public SmartLabel Labels { get; set; }
+
public int OrderIndex { get; }
public Money Balance { get; set; }

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
@@ -53,12 +53,10 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
{
if (selectedItem is null)
{
- Console.WriteLine("Selection is null");
return;
}
- Console.WriteLine("Navigate to Detals");
- Navigate(NavigationTarget.DialogScreen).To(new TransactionDetailsViewModel());
+ Navigate(NavigationTarget.DialogScreen).To(new TransactionDetailsViewModel(selectedItem));
});
this.WhenAnyValue(x => x.SelectedItem)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionDetailsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionDetailsViewModel.cs
@@ -5,9 +5,12 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
[NavigationMetaData(Title = "Transaction Details")]
public partial class TransactionDetailsViewModel : RoutableViewModel
{
- public TransactionDetailsViewModel()
+ public TransactionDetailsViewModel(HistoryItemViewModel historyItem)
{
+ HistoryItem = historyItem;
EnableCancel = true;
}
+
+ public HistoryItemViewModel HistoryItem { get; }
}
}

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/TransactionDetailsView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/TransactionDetailsView.axaml
<c:ContentArea Title="{Binding Title}"
NextContent="Done" EnableNext="True"
EnableCancel="{Binding EnableCancel}">
+ <StackPanel Spacing="20" DataContext="{Binding HistoryItem}">
+ <!-- Date -->
+ <c:PreviewItem Icon="{StaticResource timer_regular}"
+ Text="Date"
+ Content="{Binding Date}" />
+ <Separator />
+
+ <!-- Transaction ID -->
+ <c:PreviewItem Icon=""
+ Text="Transaction ID"
+ Content="{Binding TransactionId}" />
+ <Separator />
+
+ <!-- Status -->
+ <c:PreviewItem Icon=""
+ Text="Status"
+ Content="{Binding IsConfirmed}" />
+ <Separator />
+
+ <!-- Incoming amount -->
+ <c:PreviewItem Icon="{StaticResource btc_logo}"
+ Text="Incoming amount"
+ Content="{Binding IncomingAmount}"
+ IsVisible="{Binding !!IncomingAmount}"/>
+ <Separator IsVisible="{Binding !!IncomingAmount}" />
+
+ <!-- Outgoing amount -->
+ <c:PreviewItem Icon="{StaticResource btc_logo}"
+ Text="outgoing amount"
+ Content="{Binding OutgoingAmount}"
+ IsVisible="{Binding !!OutgoingAmount}" />
+ <Separator IsVisible="{Binding !!OutgoingAmount}" />
+
+
+ <!-- Labels -->
+ <c:PreviewItem Icon="{StaticResource entities_regular}"
+ Text="Labels">
+ <c:TagsBox Padding="0" IsReadOnly="True" Items="{Binding Labels}" />
+ </c:PreviewItem>
+ <Separator />
+
+ <!-- Block height -->
+ <c:PreviewItem Icon=""
+ Text="Block height"
+ Content="{Binding BlockHeight}" />
+ <Separator />
+
+ <!-- Confirmations -->
+ <c:PreviewItem Icon=""
+ Text="Confirmations"
+ Content="{Binding Confirmations}" />
+ <Separator />
+
+ </StackPanel>
</c:ContentArea>
</UserControl>

add basic transaction details view structure