1
0

qml: enable send for watch-only wallets, show raw tx dialog after finalizing

also use QEAMount setters in qetxfinalizer instead of re-instantiating
This commit is contained in:
Sander van Grieken
2022-08-15 13:40:20 +02:00
parent 6190498dfc
commit 46d3aa4515
6 changed files with 35 additions and 9 deletions

View File

@@ -18,6 +18,13 @@ Pane {
is_max.checked = false
}
function showUnsignedTx(tx) {
var dialog = app.genericShareDialog.createObject(rootItem,
{ title: qsTr('Raw Transaction'), text: tx }
)
dialog.open()
}
GridLayout {
id: form
width: parent.width
@@ -162,6 +169,9 @@ Pane {
dialog.txaccepted.connect(function() {
userEnteredPayment.clear()
rootItem.clear()
if (Daemon.currentWallet.isWatchOnly) {
showUnsignedTx(dialog.finalizer.serializedTx())
}
})
dialog.open()
}
@@ -268,6 +278,11 @@ Pane {
'satoshis': invoice.amount,
'message': invoice.message
})
dialog.txaccepted.connect(function() {
if (Daemon.currentWallet.isWatchOnly) {
showUnsignedTx(dialog.finalizer.serializedTx())
}
})
dialog.open()
} else if (invoice.invoiceType == Invoice.LightningInvoice) {
console.log('About to pay lightning invoice')