Browse Source

qml: pass the invoice/invoiceparser to payOnchain

master
Sander van Grieken 2 years ago
parent
commit
a740a20fc2
  1. 6
      electrum/gui/qml/components/WalletMainView.qml

6
electrum/gui/qml/components/WalletMainView.qml

@ -63,7 +63,7 @@ Item {
dialog.open() dialog.open()
} }
function payOnchain() { function payOnchain(invoice) {
var dialog = confirmPaymentDialog.createObject(mainView, { var dialog = confirmPaymentDialog.createObject(mainView, {
address: invoice.address, address: invoice.address,
satoshis: invoice.amountOverride.isEmpty satoshis: invoice.amountOverride.isEmpty
@ -361,7 +361,7 @@ Item {
} }
} }
if (invoice.invoiceType == Invoice.OnchainInvoice) { if (invoice.invoiceType == Invoice.OnchainInvoice) {
payOnchain() payOnchain(invoice)
} else if (invoice.invoiceType == Invoice.LightningInvoice) { } else if (invoice.invoiceType == Invoice.LightningInvoice) {
if (lninvoiceButPayOnchain) { if (lninvoiceButPayOnchain) {
var dialog = app.messageDialog.createObject(mainView, { var dialog = app.messageDialog.createObject(mainView, {
@ -369,7 +369,7 @@ Item {
yesno: true yesno: true
}) })
dialog.accepted.connect(function() { dialog.accepted.connect(function() {
payOnchain() payOnchain(invoice)
}) })
dialog.open() dialog.open()
} else { } else {

Loading…
Cancel
Save