add confirmation number to history
MODIFY
WalletWasabi.Fluent/Extensions/TransactionSummaryExtension.cs
WalletWasabi.Fluent/Extensions/TransactionSummaryExtension.cs
@@ -11,10 +11,12 @@ public static class TransactionSummaryExtension
{
public static bool IsConfirmed(this TransactionSummary model)
{
- var confirmations = model.Height.Type == HeightType.Chain ? (int)Services.BitcoinStore.SmartHeaderChain.TipHeight - model.Height.Value + 1 : 0;
+ var confirmations = model.GetConfirmations();
return confirmations > 0;
}
+ public static int GetConfirmations(this TransactionSummary model) => model.Height.Type == HeightType.Chain ? (int)Services.BitcoinStore.SmartHeaderChain.TipHeight - model.Height.Value + 1 : 0;
+
public static MoneyUnit ToMoneyUnit(this FeeDisplayUnit feeDisplayUnit) =>
feeDisplayUnit switch
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/Details/TransactionDetailsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/Details/TransactionDetailsViewModel.cs
@@ -63,7 +63,7 @@ public partial class TransactionDetailsViewModel : RoutableViewModel
TransactionId = transactionSummary.TransactionId.ToString();
Labels = transactionSummary.Label;
BlockHeight = transactionSummary.Height.Type == HeightType.Chain ? transactionSummary.Height.Value : 0;
- Confirmations = transactionSummary.Height.Type == HeightType.Chain ? (int)_wallet.BitcoinStore.SmartHeaderChain.TipHeight - transactionSummary.Height.Value + 1 : 0;
+ Confirmations = transactionSummary.GetConfirmations();
IsConfirmed = Confirmations > 0;
Amount = transactionSummary.Amount.ToString(fplus: false, trimExcessZero: false);
BlockHash = transactionSummary.BlockHash?.ToString();

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/CoinJoinHistoryItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/CoinJoinHistoryItemViewModel.cs
@@ -3,6 +3,7 @@ using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.Transactions;
using WalletWasabi.Fluent.Extensions;
+using WalletWasabi.Fluent.Helpers;
using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.Fluent.ViewModels.Wallets.Home.History.Details;
@@ -26,6 +27,9 @@ public class CoinJoinHistoryItemViewModel : HistoryItemViewModelBase
CoinJoinTransaction = transactionSummary;
IsSingleCoinJoinTransaction = isSingleCoinJoinTransaction;
+ var confirmations = transactionSummary.GetConfirmations();
+ ConfirmedToolTip = $"{confirmations} confirmation{TextHelpers.AddSIfPlural(confirmations)}";
+
var amount = transactionSummary.Amount;
if (amount < Money.Zero)
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/HistoryItemViewModelBase.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/HistoryItemViewModelBase.cs
@@ -20,12 +20,14 @@ public abstract partial class HistoryItemViewModelBase : ViewModelBase
[AutoNotify] private string _dateString = "";
[AutoNotify] private bool _isConfirmed;
[AutoNotify] private bool _isExpanded;
+ [AutoNotify] private string _confirmedToolTip;
private ObservableCollection<HistoryItemViewModelBase>? _children;
protected HistoryItemViewModelBase(int orderIndex, TransactionSummary transactionSummary)
{
OrderIndex = orderIndex;
Id = transactionSummary.TransactionId;
+ _confirmedToolTip = "Confirmed";
ClipboardCopyCommand = ReactiveCommand.CreateFromTask<string>(CopyToClipboardAsync);

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/TransactionHistoryItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItems/TransactionHistoryItemViewModel.cs
@@ -5,6 +5,7 @@ using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.Transactions;
using WalletWasabi.Fluent.Extensions;
+using WalletWasabi.Fluent.Helpers;
using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.Fluent.ViewModels.Wallets.Home.History.Details;
@@ -25,6 +26,9 @@ public class TransactionHistoryItemViewModel : HistoryItemViewModelBase
Date = transactionSummary.DateTime.ToLocalTime();
Balance = balance;
+ var confirmations = transactionSummary.GetConfirmations();
+ ConfirmedToolTip = $"{confirmations} confirmation{TextHelpers.AddSIfPlural(confirmations)}";
+
var amount = transactionSummary.Amount;
if (amount < Money.Zero)
{

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/Columns/IndicatorsColumnView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/Columns/IndicatorsColumnView.axaml
Data="{StaticResource checkmark_filled}"
Height="11"
Opacity="0.6"
- ToolTip.Tip="Confirmed" />
+ ToolTip.Tip="{Binding ConfirmedToolTip}" />
<!-- Pending -->
<PathIcon IsVisible="{Binding !IsConfirmed}"
Data="{StaticResource clock_regular}"

add confirmation number to history