1
0
This commit is contained in:
Sander van Grieken
2022-06-13 19:00:31 +02:00
parent f6a46f3900
commit 8f8a1fc8cf
15 changed files with 682 additions and 68 deletions

View File

@@ -161,6 +161,7 @@ Pane {
rootItem.clear()
}
}
}
}
@@ -244,6 +245,11 @@ Pane {
}
}
Component {
id: lightningPaymentProgressDialog
LightningPaymentProgressDialog {}
}
Component {
id: invoiceDialog
InvoiceDialog {
@@ -255,6 +261,17 @@ Pane {
'message': invoice.message
})
dialog.open()
} else if (invoice.invoiceType == Invoice.LightningInvoice) {
console.log('About to pay lightning invoice')
if (invoice.key == '') {
console.log('No invoice key, aborting')
return
}
var dialog = lightningPaymentProgressDialog.createObject(rootItem, {
invoice_key: invoice.key
})
dialog.open()
Daemon.currentWallet.pay_lightning_invoice(invoice.key)
}
}
}
@@ -263,8 +280,7 @@ Pane {
Connections {
target: Daemon.currentWallet
function onInvoiceStatusChanged(key, status) {
// TODO: status from?
//Daemon.currentWallet.invoiceModel.updateInvoice(key, status)
Daemon.currentWallet.invoiceModel.updateInvoice(key, status)
}
}