rename `UserLabels` to `Recipient`
MODIFY
WalletWasabi.Fluent/Helpers/TransactionHelpers.cs
WalletWasabi.Fluent/Helpers/TransactionHelpers.cs
@@ -71,7 +71,7 @@ public static class TransactionHelpers
return BuildChangelessTransaction(
wallet,
transactionInfo.Destination,
- transactionInfo.UserLabels,
+ transactionInfo.Recipient,
transactionInfo.FeeRate,
transactionInfo.ChangelessCoins,
tryToSign: tryToSign);
@@ -86,7 +86,7 @@ public static class TransactionHelpers
wallet,
transactionInfo.Destination,
transactionInfo.Amount,
- transactionInfo.UserLabels,
+ transactionInfo.Recipient,
transactionInfo.FeeRate,
transactionInfo.Coins,
transactionInfo.SubtractFee,
@@ -110,7 +110,7 @@ public static class TransactionHelpers
destination: transactionInfo.Destination,
amount: transactionInfo.Amount,
subtractFee: transactionInfo.SubtractFee,
- label: transactionInfo.UserLabels);
+ label: transactionInfo.Recipient);
var network = keyManager.GetNetwork();
var builder = new TransactionFactory(network, keyManager, allCoins, new EmptyTransactionStore(network), password, true);

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Advanced/WalletCoins/WalletCoinsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Advanced/WalletCoins/WalletCoinsViewModel.cs
@@ -126,7 +126,7 @@ public partial class WalletCoinsViewModel : RoutableViewModel
Coins = selectedSmartCoins,
Amount = selectedSmartCoins.Sum(x => x.Amount),
SubtractFee = true,
- UserLabels = label,
+ Recipient = label,
IsSelectedCoinModificationEnabled = false,
IsFixedAmount = true,
};

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/ChangeAvoidanceSuggestionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/ChangeAvoidanceSuggestionViewModel.cs
@@ -77,7 +77,7 @@ public partial class ChangeAvoidanceSuggestionViewModel : SuggestionViewModel
transaction = TransactionHelpers.BuildChangelessTransaction(
wallet,
transactionInfo.Destination,
- transactionInfo.UserLabels,
+ transactionInfo.Recipient,
transactionInfo.FeeRate,
selection,
tryToSign: false);

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/LabelSelectionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/LabelSelectionViewModel.cs
@@ -68,8 +68,8 @@ public partial class LabelSelectionViewModel : ViewModelBase
var privateAndSemiPrivateAndUnknownPockets = privateAndSemiPrivatePockets.Union(unknownPockets).ToArray();
var privateAndSemiPrivateAndKnownPockets = privateAndSemiPrivatePockets.Union(knownPockets).ToArray();
- var knownByRecipientPockets = knownPockets.Where(pocket => pocket.Labels.Any(label => _info.UserLabels.Contains(label, StringComparer.OrdinalIgnoreCase))).ToArray();
- var onlyKnownByRecipientPockets = knownByRecipientPockets.Where(pocket => pocket.Labels.Equals(_info.UserLabels, StringComparer.OrdinalIgnoreCase)).ToArray();
+ var knownByRecipientPockets = knownPockets.Where(pocket => pocket.Labels.Any(label => _info.Recipient.Contains(label, StringComparer.OrdinalIgnoreCase))).ToArray();
+ var onlyKnownByRecipientPockets = knownByRecipientPockets.Where(pocket => pocket.Labels.Equals(_info.Recipient, StringComparer.OrdinalIgnoreCase)).ToArray();
if (IsPocketEnough(onlyKnownByRecipientPockets))
{
@@ -86,7 +86,7 @@ public partial class LabelSelectionViewModel : ViewModelBase
return privateAndSemiPrivatePockets;
}
- if (TryGetBestKnownByRecipientPocketsWithPrivateAndSemiPrivatePockets(knownByRecipientPockets, privateAndSemiPrivatePockets, _targetAmount, _feeRate, _info.UserLabels, out var pockets))
+ if (TryGetBestKnownByRecipientPocketsWithPrivateAndSemiPrivatePockets(knownByRecipientPockets, privateAndSemiPrivatePockets, _targetAmount, _feeRate, _info.Recipient, out var pockets))
{
return pockets;
}
@@ -279,7 +279,7 @@ public partial class LabelSelectionViewModel : ViewModelBase
var usedPockets = GetUsedPockets();
var usedPocketsLabels = new SmartLabel(usedPockets.SelectMany(p => p.Labels));
- if (usedPocketsLabels != _info.UserLabels || !IsPocketEnough(usedPockets))
+ if (usedPocketsLabels != _info.Recipient || !IsPocketEnough(usedPockets))
{
isPrivateNeeded = true;

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -115,7 +115,7 @@ public partial class SendViewModel : RoutableViewModel
var transactionInfo = new TransactionInfo(BitcoinAddress.Create(To, _wallet.Network), _wallet.AnonScoreTarget)
{
Amount = new Money(AmountBtc, MoneyUnit.BTC),
- UserLabels = label,
+ Recipient = label,
PayJoinClient = PayJoinEndPoint is { } ? GetPayjoinClient(PayJoinEndPoint) : null,
IsFixedAmount = _isFixedAmount
};

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionInfo.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionInfo.cs
@@ -37,7 +37,7 @@ public partial class TransactionInfo
public BitcoinAddress Destination { get; init; }
- public SmartLabel UserLabels { get; set; } = SmartLabel.Empty;
+ public SmartLabel Recipient { get; set; } = SmartLabel.Empty;
public FeeRate? MaximumPossibleFeeRate { get; set; }
@@ -81,7 +81,7 @@ public partial class TransactionInfo
MinimumRequiredAmount = MinimumRequiredAmount,
Amount = Amount,
Destination = Destination,
- UserLabels = UserLabels,
+ Recipient = Recipient,
MaximumPossibleFeeRate = MaximumPossibleFeeRate,
ConfirmationTimeSpan = ConfirmationTimeSpan,
ChangelessCoins = ChangelessCoins,

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
@@ -522,6 +522,6 @@ public partial class TransactionPreviewViewModel : RoutableViewModel
var labelSelection = new LabelSelectionViewModel(_wallet.KeyManager, _wallet.Kitchen.SaltSoup(), _info);
labelSelection.Reset(pockets);
- _info.IsOtherPocketSelectionPossible = labelSelection.IsOtherSelectionPossible(usedCoins, _info.UserLabels);
+ _info.IsOtherPocketSelectionPossible = labelSelection.IsOtherSelectionPossible(usedCoins, _info.Recipient);
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionSummaryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionSummaryViewModel.cs
@@ -68,10 +68,10 @@ public partial class TransactionSummaryViewModel : ViewModelBase
TransactionHasChange =
_transaction.InnerWalletOutputs.Any(x => x.ScriptPubKey != info.Destination.ScriptPubKey);
- Labels = new SmartLabel(transactionResult.SpentCoins.SelectMany(x => x.GetLabels(info.PrivateCoinThreshold)).Except(info.UserLabels.Labels));
+ Labels = new SmartLabel(transactionResult.SpentCoins.SelectMany(x => x.GetLabels(info.PrivateCoinThreshold)).Except(info.Recipient.Labels));
TransactionHasPockets = Labels.Any();
- Recipient = info.UserLabels;
+ Recipient = info.Recipient;
IsCustomFeeUsed = info.IsCustomFeeUsed;
IsOtherPocketSelectionPossible = info.IsOtherPocketSelectionPossible;

MODIFY
WalletWasabi.Tests/UnitTests/UserInterfaceTest/PocketSelectionTests.cs
WalletWasabi.Tests/UnitTests/UserInterfaceTest/PocketSelectionTests.cs
@@ -27,7 +27,7 @@ public class PocketSelectionTests
{
Amount = amount,
FeeRate = new FeeRate(2m),
- UserLabels = recipient
+ Recipient = recipient
};
return new LabelSelectionViewModel(km, pw, info);

rename `UserLabels` to `Recipient`