Fixed SendViewModel text trimming behavior
MODIFY
WalletWasabi.Fluent/Behaviors/PasteButtonFlashBehavior.cs
WalletWasabi.Fluent/Behaviors/PasteButtonFlashBehavior.cs
@@ -95,7 +95,7 @@ public class PasteButtonFlashBehavior : AttachedToVisualTreeBehavior<AnimatedBut
{
AssociatedObject.Classes.Add(FlashAnimation);
_lastFlashedOn = clipboardValue;
- ToolTip.SetTip(AssociatedObject, $"Paste BTC Address:\r\n{clipboardValue}");
+ ToolTip.SetTip(AssociatedObject, $"Paste BTC Address:\r\n{clipboardValue.Trim()}");
}
else
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -248,11 +248,6 @@ public partial class SendViewModel : RoutableViewModel
Dispatcher.UIThread.Post(() =>
{
- if (s.IsTrimmable())
- {
- To = s.Trim();
- }
-
TryParseUrl(s);
_parsingUrl = false;
});
@@ -260,11 +255,16 @@ public partial class SendViewModel : RoutableViewModel
private bool TryParseUrl(string? text)
{
- if (text is null || text.IsTrimmable())
+ if (string.IsNullOrEmpty(text))
{
return false;
}
+ if (text.IsTrimmable())
+ {
+ text = text.Trim();
+ }
+
bool result = false;
if (AddressStringParser.TryParse(text, _wallet.Network, out BitcoinUrlBuilder? url))

Fixed SendViewModel text trimming behavior