SendViewModel - fix reentrance problem in TryParseUrl()
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 Wallet _wallet;
private readonly TransactionInfo _transactionInfo;
private readonly CoinJoinManager? _coinJoinManager;
+ private bool _parsingTo;
[AutoNotify] private string _to;
[AutoNotify] private decimal _amountBtc;
[AutoNotify] private decimal _exchangeRate;
@@ -240,10 +241,20 @@ public partial class SendViewModel : RoutableViewModel
private bool TryParseUrl(string? text)
{
+ if (_parsingTo)
+ {
+ return false;
+ }
+
+ _parsingTo = true;
+
text = text?.Trim();
if (string.IsNullOrEmpty(text))
{
+ _parsingTo = false;
+ PayJoinEndPoint = null;
+ IsFixedAmount = false;
return false;
}
@@ -287,6 +298,8 @@ public partial class SendViewModel : RoutableViewModel
PayJoinEndPoint = null;
}
+ Dispatcher.UIThread.Post(() => _parsingTo = false);
+
return result;
}

SendViewModel - fix reentrance problem in TryParseUrl()