From 244ead2624cb928bb26867a53bb6174016996109 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Fri, 31 Mar 2023 15:04:27 +0200 Subject: [PATCH] qml: auto-pay if entering InvoiceDialog from a lnurl-pay dialog --- electrum/gui/qml/components/InvoiceDialog.qml | 5 +++++ electrum/gui/qml/components/LnurlPayRequestDialog.qml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qml/components/InvoiceDialog.qml b/electrum/gui/qml/components/InvoiceDialog.qml index 16ba9a645..3fdd19db6 100644 --- a/electrum/gui/qml/components/InvoiceDialog.qml +++ b/electrum/gui/qml/components/InvoiceDialog.qml @@ -456,5 +456,10 @@ ElDialog { } else if (invoice.amount.isMax) { amountMax.checked = true } + if (invoice.lnurlData) { + // we arrive from a lnurl-pay confirm dialog where the user already indicated the intent to pay. + if (invoice.canPay) + doPay() + } } } diff --git a/electrum/gui/qml/components/LnurlPayRequestDialog.qml b/electrum/gui/qml/components/LnurlPayRequestDialog.qml index 468db200a..e815729f7 100644 --- a/electrum/gui/qml/components/LnurlPayRequestDialog.qml +++ b/electrum/gui/qml/components/LnurlPayRequestDialog.qml @@ -92,7 +92,7 @@ ElDialog { FlatButton { Layout.topMargin: constants.paddingLarge Layout.fillWidth: true - text: qsTr('Proceed') + text: qsTr('Pay') icon.source: '../../icons/confirmed.png' enabled: valid onClicked: {