add confirmations to wallet coins
MODIFY
WalletWasabi.Fluent/Helpers/CoinHelpers.cs
WalletWasabi.Fluent/Helpers/CoinHelpers.cs
using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.TransactionOutputs;
+using WalletWasabi.Models;
namespace WalletWasabi.Fluent.Helpers;
@@ -29,4 +30,6 @@ public static class CoinHelpers
return coin.HdPubKey.Cluster.Labels;
}
+
+ public static int GetConfirmations(this SmartCoin coin) => coin.Height.Type == HeightType.Chain ? (int)Services.BitcoinStore.SmartHeaderChain.TipHeight - coin.Height.Value + 1 : 0;
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Advanced/WalletCoins/WalletCoinViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Advanced/WalletCoins/WalletCoinViewModel.cs
@@ -2,8 +2,10 @@ using NBitcoin;
using ReactiveUI;
using System.Collections.Generic;
using System.Reactive.Disposables;
+using System.Reactive.Linq;
using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.TransactionOutputs;
+using WalletWasabi.Fluent.Helpers;
namespace WalletWasabi.Fluent.ViewModels.Wallets.Advanced.WalletCoins;
@@ -18,6 +20,7 @@ public partial class WalletCoinViewModel : ViewModelBase, IDisposable
[AutoNotify] private bool _isSelected;
[AutoNotify] private bool _isBanned;
[AutoNotify] private string? _bannedUntilUtcToolTip;
+ [AutoNotify] private string? _confirmedToolTip;
public WalletCoinViewModel(SmartCoin coin)
{
@@ -30,6 +33,7 @@ public partial class WalletCoinViewModel : ViewModelBase, IDisposable
Coin.WhenAnyValue(c => c.CoinJoinInProgress).Subscribe(x => CoinJoinInProgress = x).DisposeWith(_disposables);
Coin.WhenAnyValue(c => c.IsBanned).Subscribe(x => IsBanned = x).DisposeWith(_disposables);
Coin.WhenAnyValue(c => c.BannedUntilUtc).Subscribe(x => BannedUntilUtcToolTip = $"Banned until: {x}").DisposeWith(_disposables);
+ Coin.WhenAnyValue(c => c.Height).Select(_ => Coin.GetConfirmations()).Subscribe(x => ConfirmedToolTip = $"{x} confirmation{TextHelpers.AddSIfPlural(x)}").DisposeWith(_disposables);
}
public SmartCoin Coin { get; }

MODIFY
WalletWasabi.Fluent/Views/Wallets/Advanced/WalletCoins/Columns/IndicatorsColumnView.axaml
WalletWasabi.Fluent/Views/Wallets/Advanced/WalletCoins/Columns/IndicatorsColumnView.axaml
Data="{StaticResource checkmark_filled}"
Foreground="{DynamicResource SystemAccentColor}"
Height="11"
- ToolTip.Tip="Confirmed" />
+ ToolTip.Tip="{Binding ConfirmedToolTip}" />
<!-- Pending -->
<PathIcon IsVisible="{Binding !Confirmed}"
Data="{StaticResource clock_regular}"

add confirmations to wallet coins