qml: close SwapDialog only after starting swap.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user