1
0

qml: auto sign and broadcast for cancel txs too

This commit is contained in:
Sander van Grieken
2023-03-10 15:26:07 +01:00
parent 7746cc8e60
commit a595102d5f

View File

@@ -133,6 +133,7 @@ Pane {
TextHighlightPane {
Layout.fillWidth: true
Layout.topMargin: constants.paddingSmall
Layout.columnSpan: 2
borderColor: constants.colorWarning
visible: txdetails.canBump || txdetails.canCpfp || txdetails.canCancel
@@ -447,7 +448,7 @@ Pane {
onTxaccepted: {
root.rawtx = rbffeebumper.getNewTx()
if (Daemon.currentWallet.canSignWithoutCosigner) {
if (txdetails.wallet.canSignWithoutCosigner) {
txdetails.sign(true)
// close txdetails?
} else {
@@ -474,7 +475,7 @@ Pane {
onTxaccepted: {
// replaces parent tx with cpfp tx
root.rawtx = cpfpfeebumper.getNewTx()
if (Daemon.currentWallet.canSignWithoutCosigner) {
if (txdetails.wallet.canSignWithoutCosigner) {
txdetails.sign(true)
// close txdetails?
} else {
@@ -500,7 +501,15 @@ Pane {
onTxaccepted: {
root.rawtx = txcanceller.getNewTx()
// TODO: sign & send when possible?
if (txdetails.wallet.canSignWithoutCosigner) {
txdetails.sign(true)
// close txdetails?
} else {
var dialog = app.messageDialog.createObject(app, {
text: qsTr('Cancel transaction created.') + '\n\n' + qsTr('You still need to sign and broadcast this transaction.')
})
dialog.open()
}
}
onClosed: destroy()
}