fix: block wrongly parsed addresses (#2656)
* fix: block wrongly parsed addresses * fix: move parsed address check into handlePaymentFlow method * fix: Handle QR URLs separately for pay anything flow
David Adegoke committed
Nov 18, 2025 at 20:26 UTC
7f757a92a0d0354956554839a67b3bf9ef54c8d0
2 files changed
+3
-3
lib/src/screens/send/widgets/send_card.dart
+2
-2
@@ -149,6 +149,8 @@ class SendCardState extends State<SendCard> with AutomaticKeepAliveClientMixin<S
149
}
150
151
Future<void> _handlePaymentFlow(String uri, PaymentRequest paymentRequest) async {
152
+ if (uri.contains('@') || paymentRequest.address.contains('@')) return;
153
+
154
try {
155
final result = await paymentViewModel.processAddress(uri);
156
@@ -446,8 +448,6 @@ class SendCardState extends State<SendCard> with AutomaticKeepAliveClientMixin<S
448
final address =
449
output.isParsedAddress ? output.extractedAddress : output.address;
450
449
- if (address.contains('@')) return;
450
-
451
await _handlePaymentFlow(
452
address,
453
PaymentRequest(
lib/view_model/payment/payment_view_model.dart
+1
-1
@@ -45,7 +45,7 @@ abstract class PaymentViewModelBase with Store {
45
return PaymentFlowResult.incompatible('Unable to detect address type');
46
}
47
48
- if (_isEVMAddress(detectionResult.address)) {
48
+ if (!addressData.contains(':') && _isEVMAddress(detectionResult.address)) {
49
return PaymentFlowResult.evmNetworkSelection(detectionResult);
50
}
51