From 5881eb3035db115513b5630472db794215b0a908 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Fri, 12 May 2023 15:49:42 +0200 Subject: [PATCH] qml: LnurlPayRequestDialog validate amount between indicated boundaries --- electrum/gui/qml/components/LnurlPayRequestDialog.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qml/components/LnurlPayRequestDialog.qml b/electrum/gui/qml/components/LnurlPayRequestDialog.qml index 6d1effeb7..6cc2030df 100644 --- a/electrum/gui/qml/components/LnurlPayRequestDialog.qml +++ b/electrum/gui/qml/components/LnurlPayRequestDialog.qml @@ -17,7 +17,10 @@ ElDialog { padding: 0 - property bool valid: comment.text.length <= invoiceParser.lnurlData['comment_allowed'] + property bool commentValid: comment.text.length <= invoiceParser.lnurlData['comment_allowed'] + property bool amountValid: amountBtc.textAsSats.satsInt >= parseInt(invoiceParser.lnurlData['min_sendable_sat']) + && amountBtc.textAsSats.satsInt <= parseInt(invoiceParser.lnurlData['max_sendable_sat']) + property bool valid: commentValid && amountValid ColumnLayout { width: parent.width