From dbc8c7d47349798f27a106f9c5e3c4e852d6901c Mon Sep 17 00:00:00 2001 From: selsta Date: Tue, 29 Jun 2021 04:34:03 +0200 Subject: [PATCH] qr: scan valid addresses that miss an uri prefix --- components/QRCodeScanner.qml | 3 +++ pages/Transfer.qml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/components/QRCodeScanner.qml b/components/QRCodeScanner.qml index a4d6927c..f3dd4a0d 100644 --- a/components/QRCodeScanner.qml +++ b/components/QRCodeScanner.qml @@ -90,6 +90,9 @@ Rectangle { if (!parsed.error) { root.qrcode_decoded(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description, parsed.recipient_name, parsed.extra_parameters); root.state = "Stopped"; + } else if (walletManager.addressValid(data, appWindow.persistentSettings.nettype)) { + root.qrcode_decoded(data, "", "", "", "", null); + root.state = "Stopped"; } else { onNotifyError(parsed.error); } diff --git a/pages/Transfer.qml b/pages/Transfer.qml index 156d4e1e..6e8d912a 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -285,6 +285,9 @@ Rectangle { if (!parsed.error) { fillPaymentDetails(parsed.address, parsed.payment_id, parsed.amount, parsed.tx_description, parsed.recipient_name); break; + } else if (walletManager.addressValid(codes[index], appWindow.persistentSettings.nettype)) { + fillPaymentDetails(codes[index]); + break; } } }