qml: (clarity) use separate slots for sign and sign_and_broadcast.
This commit is contained in:
@@ -460,11 +460,10 @@ Pane {
|
||||
wallet: Daemon.currentWallet
|
||||
txid: dialog.txid
|
||||
}
|
||||
|
||||
onTxaccepted: {
|
||||
root.rawtx = rbffeebumper.getNewTx()
|
||||
if (txdetails.wallet.canSignWithoutCosigner) {
|
||||
txdetails.sign(true)
|
||||
txdetails.sign_and_broadcast()
|
||||
// close txdetails?
|
||||
} else {
|
||||
var dialog = app.messageDialog.createObject(app, {
|
||||
@@ -491,7 +490,7 @@ Pane {
|
||||
// replaces parent tx with cpfp tx
|
||||
root.rawtx = cpfpfeebumper.getNewTx()
|
||||
if (txdetails.wallet.canSignWithoutCosigner) {
|
||||
txdetails.sign(true)
|
||||
txdetails.sign_and_broadcast()
|
||||
// close txdetails?
|
||||
} else {
|
||||
var dialog = app.messageDialog.createObject(app, {
|
||||
@@ -517,7 +516,7 @@ Pane {
|
||||
onTxaccepted: {
|
||||
root.rawtx = txcanceller.getNewTx()
|
||||
if (txdetails.wallet.canSignWithoutCosigner) {
|
||||
txdetails.sign(true)
|
||||
txdetails.sign_and_broadcast()
|
||||
// close txdetails?
|
||||
} else {
|
||||
var dialog = app.messageDialog.createObject(app, {
|
||||
|
||||
@@ -299,8 +299,14 @@ class QETxDetails(QObject, QtEventListener):
|
||||
self._short_id = tx_mined_info.short_id() or ""
|
||||
|
||||
@pyqtSlot()
|
||||
@pyqtSlot(bool)
|
||||
def sign(self, broadcast = False):
|
||||
def sign_and_broadcast(self):
|
||||
self._sign(broadcast=True)
|
||||
|
||||
@pyqtSlot()
|
||||
def sign(self):
|
||||
self._sign(broadcast=False)
|
||||
|
||||
def _sign(self, broadcast):
|
||||
# TODO: connecting/disconnecting signal handlers here is hmm
|
||||
try:
|
||||
self._wallet.transactionSigned.disconnect(self.onSigned)
|
||||
|
||||
Reference in New Issue
Block a user