show every labels on preview screen
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
using System.Linq;
+using System.Reactive.Disposables;
using System.Threading.Tasks;
+using Avalonia.Controls;
using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.TransactionBroadcasting;
@@ -17,9 +19,14 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
[NavigationMetaData(Title = "Transaction Preview")]
public partial class TransactionPreviewViewModel : RoutableViewModel
{
+ private readonly TransactionInfo _info;
+
+ [AutoNotify] private string[]? _labels;
+
public TransactionPreviewViewModel(Wallet wallet, TransactionInfo info, TransactionBroadcaster broadcaster,
BuildTransactionResult transaction)
{
+ _info = info;
EnableCancel = true;
EnableBack = true;
@@ -28,8 +35,6 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
var fiatAmountText = destinationAmount.GenerateFiatText(wallet.Synchronizer.UsdExchangeRate, "USD");
AmountText = $"{btcAmountText}{fiatAmountText}";
- Labels = info.Labels.Labels.ToArray();
-
AddressText = info.Address.ToString();
ConfirmationTimeText = $"Approximately {TextHelpers.TimeSpanToFriendlyString(info.ConfirmationTimeSpan)} ";
@@ -44,14 +49,19 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
public string AmountText { get; }
- public string[] Labels { get; }
-
public string AddressText { get; }
public string ConfirmationTimeText { get; }
public string FeeText { get; }
+ protected override void OnNavigatedTo(bool isInHistory, CompositeDisposable disposables)
+ {
+ base.OnNavigatedTo(isInHistory, disposables);
+
+ Labels = _info.Labels.Concat(_info.FinalLabels).ToArray();
+ }
+
private async Task OnNext(Wallet wallet, TransactionBroadcaster broadcaster, BuildTransactionResult transaction)
{
var transactionAuthorizationInfo = new TransactionAuthorizationInfo(transaction);

show every labels on preview screen