1
0

qml: close SwapDialog only after starting swap.

This commit is contained in:
Sander van Grieken
2023-01-16 09:56:52 +01:00
parent 3fbc82dc95
commit 0c728fd13f
2 changed files with 3 additions and 1 deletions

View File

@@ -207,12 +207,12 @@ ElDialog {
dialog.yesClicked.connect(function() {
dialog.close()
swaphelper.executeSwap(true)
root.close()
})
dialog.open()
}
onAuthRequired: {
app.handleAuthRequired(swaphelper, method)
}
onSwapStarted: root.close() // TODO: show swap progress monitor
}
}

View File

@@ -20,6 +20,7 @@ class QESwapHelper(AuthMixin, QObject):
error = pyqtSignal([str], arguments=['message'])
confirm = pyqtSignal([str], arguments=['message'])
swapStarted = pyqtSignal()
def __init__(self, parent=None):
super().__init__(parent)
@@ -355,3 +356,4 @@ class QESwapHelper(AuthMixin, QObject):
lightning_amount = self._receive_amount
onchain_amount = self._send_amount
self.do_normal_swap(lightning_amount, onchain_amount)
self.swapStarted.emit()