qml: auto sign and broadcast for cancel txs too
This commit is contained in:
@@ -133,6 +133,7 @@ Pane {
|
|||||||
|
|
||||||
TextHighlightPane {
|
TextHighlightPane {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: constants.paddingSmall
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
borderColor: constants.colorWarning
|
borderColor: constants.colorWarning
|
||||||
visible: txdetails.canBump || txdetails.canCpfp || txdetails.canCancel
|
visible: txdetails.canBump || txdetails.canCpfp || txdetails.canCancel
|
||||||
@@ -447,7 +448,7 @@ Pane {
|
|||||||
|
|
||||||
onTxaccepted: {
|
onTxaccepted: {
|
||||||
root.rawtx = rbffeebumper.getNewTx()
|
root.rawtx = rbffeebumper.getNewTx()
|
||||||
if (Daemon.currentWallet.canSignWithoutCosigner) {
|
if (txdetails.wallet.canSignWithoutCosigner) {
|
||||||
txdetails.sign(true)
|
txdetails.sign(true)
|
||||||
// close txdetails?
|
// close txdetails?
|
||||||
} else {
|
} else {
|
||||||
@@ -474,7 +475,7 @@ Pane {
|
|||||||
onTxaccepted: {
|
onTxaccepted: {
|
||||||
// replaces parent tx with cpfp tx
|
// replaces parent tx with cpfp tx
|
||||||
root.rawtx = cpfpfeebumper.getNewTx()
|
root.rawtx = cpfpfeebumper.getNewTx()
|
||||||
if (Daemon.currentWallet.canSignWithoutCosigner) {
|
if (txdetails.wallet.canSignWithoutCosigner) {
|
||||||
txdetails.sign(true)
|
txdetails.sign(true)
|
||||||
// close txdetails?
|
// close txdetails?
|
||||||
} else {
|
} else {
|
||||||
@@ -500,7 +501,15 @@ Pane {
|
|||||||
|
|
||||||
onTxaccepted: {
|
onTxaccepted: {
|
||||||
root.rawtx = txcanceller.getNewTx()
|
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()
|
onClosed: destroy()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user