qml: auto close invoicedialog after successful onchain tx broadcast
This commit is contained in:
@@ -12,6 +12,7 @@ ElDialog {
|
||||
|
||||
property Invoice invoice
|
||||
property bool payImmediately: false
|
||||
property string broadcastTxid
|
||||
|
||||
signal doPay
|
||||
signal invoiceAmountChanged
|
||||
@@ -511,6 +512,20 @@ ElDialog {
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Daemon.currentWallet
|
||||
function onBroadcastSucceeded(txid) {
|
||||
if (dialog.broadcastTxid == txid) {
|
||||
// our txid was broadcast successfully, close invoicedialog and show success popup
|
||||
dialog.close()
|
||||
var successdialog = app.messageDialog.createObject(mainView, {
|
||||
text: qsTr('Payment sent.')
|
||||
})
|
||||
successdialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FontMetrics {
|
||||
id: amountFontMetrics
|
||||
font: amountBtc.font
|
||||
|
||||
Reference in New Issue
Block a user