Fix bug when the parsed label hasn't been taken into account
MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/LabelEntryDialogViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/LabelEntryDialogViewModel.cs
@@ -17,12 +17,12 @@ public partial class LabelEntryDialogViewModel : DialogViewModelBase<SmartLabel?
{
private readonly Wallet _wallet;
- public LabelEntryDialogViewModel(Wallet wallet, TransactionInfo info)
+ public LabelEntryDialogViewModel(Wallet wallet, SmartLabel label)
{
_wallet = wallet;
SuggestionLabels = new SuggestionLabelsViewModel(wallet.KeyManager, Intent.Send, 3)
{
- Labels = { info.UserLabels.Labels }
+ Labels = { label }
};
SetupCancel(enableCancel: true, enableCancelOnEscape: true, enableCancelOnPressed: true);

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -43,6 +43,7 @@ public partial class SendViewModel : RoutableViewModel
private readonly TransactionInfo _transactionInfo;
private readonly CoinJoinManager? _coinJoinManager;
private bool _parsingTo;
+ private SmartLabel _parsedLabel = SmartLabel.Empty;
[AutoNotify] private string _to;
[AutoNotify] private decimal _amountBtc;
[AutoNotify] private decimal _exchangeRate;
@@ -264,7 +265,11 @@ public partial class SendViewModel : RoutableViewModel
result = true;
if (url.Label is { } label)
{
- _transactionInfo.UserLabels = new SmartLabel(label);
+ _parsedLabel = new SmartLabel(label);
+ }
+ else
+ {
+ _parsedLabel = SmartLabel.Empty;
}
if (url.UnknownParameters.TryGetValue("pj", out var endPoint))
@@ -295,6 +300,7 @@ public partial class SendViewModel : RoutableViewModel
{
IsFixedAmount = false;
PayJoinEndPoint = null;
+ _parsedLabel = SmartLabel.Empty;
}
Dispatcher.UIThread.Post(() => _parsingTo = false);

Fix bug when the parsed label hasn't been taken into account