Browse Source

follow-up 0a804607a4, don't ask confirmation for regular onchain invoices

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

8
electrum/gui/qml/components/WalletMainView.qml

@ -360,7 +360,10 @@ Item {
lninvoiceButPayOnchain = true lninvoiceButPayOnchain = true
} }
} }
if (invoice.invoiceType == Invoice.OnchainInvoice || lninvoiceButPayOnchain) { if (invoice.invoiceType == Invoice.OnchainInvoice) {
payOnchain()
} else if (invoice.invoiceType == Invoice.LightningInvoice) {
if (lninvoiceButPayOnchain) {
var dialog = app.messageDialog.createObject(mainView, { var dialog = app.messageDialog.createObject(mainView, {
title: qsTr('Insufficient balance to pay over Lightning. Pay on-chain instead?'), title: qsTr('Insufficient balance to pay over Lightning. Pay on-chain instead?'),
yesno: true yesno: true
@ -369,11 +372,12 @@ Item {
payOnchain() payOnchain()
}) })
dialog.open() dialog.open()
} else if (invoice.invoiceType == Invoice.LightningInvoice) { } else {
console.log('About to pay lightning invoice') console.log('About to pay lightning invoice')
invoice.payLightningInvoice() invoice.payLightningInvoice()
} }
} }
}
onClosed: destroy() onClosed: destroy()

Loading…
Cancel
Save