follow-up 0a804607a4, don't ask confirmation for regular onchain invoices
This commit is contained in:
@@ -360,18 +360,22 @@ Item {
|
|||||||
lninvoiceButPayOnchain = true
|
lninvoiceButPayOnchain = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (invoice.invoiceType == Invoice.OnchainInvoice || lninvoiceButPayOnchain) {
|
if (invoice.invoiceType == Invoice.OnchainInvoice) {
|
||||||
var dialog = app.messageDialog.createObject(mainView, {
|
payOnchain()
|
||||||
title: qsTr('Insufficient balance to pay over Lightning. Pay on-chain instead?'),
|
|
||||||
yesno: true
|
|
||||||
})
|
|
||||||
dialog.accepted.connect(function() {
|
|
||||||
payOnchain()
|
|
||||||
})
|
|
||||||
dialog.open()
|
|
||||||
} else if (invoice.invoiceType == Invoice.LightningInvoice) {
|
} else if (invoice.invoiceType == Invoice.LightningInvoice) {
|
||||||
console.log('About to pay lightning invoice')
|
if (lninvoiceButPayOnchain) {
|
||||||
invoice.payLightningInvoice()
|
var dialog = app.messageDialog.createObject(mainView, {
|
||||||
|
title: qsTr('Insufficient balance to pay over Lightning. Pay on-chain instead?'),
|
||||||
|
yesno: true
|
||||||
|
})
|
||||||
|
dialog.accepted.connect(function() {
|
||||||
|
payOnchain()
|
||||||
|
})
|
||||||
|
dialog.open()
|
||||||
|
} else {
|
||||||
|
console.log('About to pay lightning invoice')
|
||||||
|
invoice.payLightningInvoice()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user