Move OnAddressPaste
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendControlViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendControlViewModel.cs
@@ -216,21 +216,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
OnAddressPasteCommand = ReactiveCommand.Create((BitcoinUrlBuilder url) =>
{
- SmartLabel label = url.Label;
- if (!label.IsEmpty)
- {
- LabelSuggestion.Label = label;
- }
-
- if (url.Amount != null)
- {
- AmountText = url.Amount.ToString(false, true);
- }
-
- PayjoinEndPoint = url.UnknowParameters.TryGetValue("bpu", out var endPoint)
- || url.UnknowParameters.TryGetValue("pj", out endPoint)
- ? endPoint
- : null;
+ OnAddressPaste(url);
});
BuildTransactionCommand = ReactiveCommand.CreateFromTask(async () =>
@@ -1026,6 +1012,20 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
protected abstract Task DoAfterBuildTransaction(BuildTransactionResult result);
+ protected virtual void OnAddressPaste(BitcoinUrlBuilder url)
+ {
+ SmartLabel label = url.Label;
+ if (!label.IsEmpty)
+ {
+ LabelSuggestion.Label = label;
+ }
+
+ if (url.Amount != null)
+ {
+ AmountText = url.Amount.ToString(false, true);
+ }
+ }
+
public override bool OnClose()
{
CoinList.OnClose();

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
using NBitcoin;
+using NBitcoin.Payment;
using System;
using System.Threading;
using System.Threading.Tasks;
+using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.TransactionBuilding;
using WalletWasabi.Blockchain.Transactions;
using WalletWasabi.Gui.Helpers;
@@ -61,5 +63,15 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
ResetUi();
}
+
+ protected override void OnAddressPaste(BitcoinUrlBuilder url)
+ {
+ base.OnAddressPaste(url);
+
+ PayjoinEndPoint = url.UnknowParameters.TryGetValue("bpu", out var endPoint)
+ || url.UnknowParameters.TryGetValue("pj", out endPoint)
+ ? endPoint
+ : null;
+ }
}
}

Move OnAddressPaste