From ae1e7eea4c353d5cae78798a06164f63d67bdd65 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 26 Jul 2022 20:37:27 +0200 Subject: [PATCH] qml: make sure the auth_protect decorator finishes when closing Pin dialog without reject/accept --- electrum/gui/qml/components/Pin.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/electrum/gui/qml/components/Pin.qml b/electrum/gui/qml/components/Pin.qml index 3ab7d1af0..663c18281 100644 --- a/electrum/gui/qml/components/Pin.qml +++ b/electrum/gui/qml/components/Pin.qml @@ -65,6 +65,14 @@ ElDialog { } } + onAccepted: result = Dialog.Accepted + onRejected: result = Dialog.Rejected + onClosed: { + if (!root.result) { + root.reject() // make sure we reject the authed fn() + } + } + header: GridLayout { columns: 2 rowSpacing: 0