qml: refactor txaccepted/txcancelled signals to standard accepted/rejected.
This commit is contained in:
@@ -17,9 +17,6 @@ ElDialog {
|
||||
property alias amountLabelText: amountLabel.text
|
||||
property alias sendButtonText: sendButton.text
|
||||
|
||||
signal txcancelled
|
||||
signal txaccepted
|
||||
|
||||
title: qsTr('Confirm Transaction')
|
||||
|
||||
// copy these to finalizer
|
||||
@@ -223,12 +220,9 @@ ElDialog {
|
||||
: qsTr('Pay')
|
||||
icon.source: '../../icons/confirmed.png'
|
||||
enabled: finalizer.valid
|
||||
onClicked: {
|
||||
txaccepted()
|
||||
dialog.close()
|
||||
}
|
||||
onClicked: doAccept()
|
||||
}
|
||||
}
|
||||
|
||||
onClosed: txcancelled()
|
||||
onClosed: doReject()
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ ElDialog {
|
||||
required property string txid
|
||||
required property QtObject cpfpfeebumper
|
||||
|
||||
signal txaccepted
|
||||
|
||||
title: qsTr('Bump Fee')
|
||||
iconSource: Qt.resolvedUrl('../../icons/rocket.png')
|
||||
|
||||
@@ -224,17 +222,14 @@ ElDialog {
|
||||
text: qsTr('Ok')
|
||||
icon.source: '../../icons/confirmed.png'
|
||||
enabled: cpfpfeebumper.valid
|
||||
onClicked: {
|
||||
txaccepted()
|
||||
dialog.close()
|
||||
}
|
||||
onClicked: doAccept()
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: cpfpfeebumper
|
||||
function onTxMined() {
|
||||
dialog.close()
|
||||
dialog.doReject()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ ElDialog {
|
||||
var dialog = confirmOpenChannelDialog.createObject(app, {
|
||||
'satoshis': channelopener.amount
|
||||
})
|
||||
dialog.txaccepted.connect(function() {
|
||||
dialog.accepted.connect(function() {
|
||||
dialog.finalizer.signAndSend()
|
||||
})
|
||||
dialog.open()
|
||||
|
||||
@@ -13,8 +13,6 @@ ElDialog {
|
||||
required property string txid
|
||||
required property QtObject rbffeebumper
|
||||
|
||||
signal txaccepted
|
||||
|
||||
title: qsTr('Bump Fee')
|
||||
iconSource: Qt.resolvedUrl('../../icons/rocket.png')
|
||||
|
||||
@@ -237,17 +235,14 @@ ElDialog {
|
||||
text: qsTr('Ok')
|
||||
icon.source: '../../icons/confirmed.png'
|
||||
enabled: rbffeebumper.valid
|
||||
onClicked: {
|
||||
txaccepted()
|
||||
dialog.close()
|
||||
}
|
||||
onClicked: doAccept()
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: rbffeebumper
|
||||
function onTxMined() {
|
||||
dialog.close()
|
||||
dialog.doReject()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ ElDialog {
|
||||
required property string txid
|
||||
required property QtObject txcanceller
|
||||
|
||||
signal txaccepted
|
||||
|
||||
title: qsTr('Cancel Transaction')
|
||||
|
||||
width: parent.width
|
||||
@@ -207,17 +205,14 @@ ElDialog {
|
||||
text: qsTr('Ok')
|
||||
icon.source: '../../icons/confirmed.png'
|
||||
enabled: txcanceller.valid
|
||||
onClicked: {
|
||||
txaccepted()
|
||||
dialog.close()
|
||||
}
|
||||
onClicked: doAccept()
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: txcanceller
|
||||
function onTxMined() {
|
||||
dialog.close()
|
||||
dialog.doReject()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ Pane {
|
||||
wallet: Daemon.currentWallet
|
||||
txid: dialog.txid
|
||||
}
|
||||
onTxaccepted: {
|
||||
onAccepted: {
|
||||
root.rawtx = rbffeebumper.getNewTx()
|
||||
if (txdetails.wallet.canSignWithoutCosigner) {
|
||||
txdetails.sign_and_broadcast()
|
||||
@@ -465,7 +465,7 @@ Pane {
|
||||
txid: dialog.txid
|
||||
}
|
||||
|
||||
onTxaccepted: {
|
||||
onAccepted: {
|
||||
// replaces parent tx with cpfp tx
|
||||
root.rawtx = cpfpfeebumper.getNewTx()
|
||||
if (txdetails.wallet.canSignWithoutCosigner) {
|
||||
@@ -491,7 +491,7 @@ Pane {
|
||||
txid: dialog.txid
|
||||
}
|
||||
|
||||
onTxaccepted: {
|
||||
onAccepted: {
|
||||
root.rawtx = txcanceller.getNewTx()
|
||||
if (txdetails.wallet.canSignWithoutCosigner) {
|
||||
txdetails.sign_and_broadcast()
|
||||
|
||||
@@ -328,7 +328,7 @@ Item {
|
||||
message: invoice.message
|
||||
})
|
||||
var canComplete = !Daemon.currentWallet.isWatchOnly && Daemon.currentWallet.canSignWithoutCosigner
|
||||
dialog.txaccepted.connect(function() {
|
||||
dialog.accepted.connect(function() {
|
||||
if (!canComplete) {
|
||||
if (Daemon.currentWallet.isWatchOnly) {
|
||||
dialog.finalizer.save()
|
||||
|
||||
Reference in New Issue
Block a user