1
0

qml: feebump button in TxDetails next to tx fee, remove RbF flag

This commit is contained in:
Sander van Grieken
2022-11-25 18:43:39 +01:00
parent 78df722419
commit ebb714fa1b

View File

@@ -141,9 +141,24 @@ Pane {
font.family: FixedFont
}
Label {
Layout.fillWidth: true
text: Config.baseUnit
color: Material.accentColor
}
FlatButton {
icon.source: '../../icons/warning.png'
icon.color: 'transparent'
text: qsTr('Bump fee')
visible: txdetails.canBump || txdetails.canCpfp
onClicked: {
if (txdetails.canBump) {
var dialog = rbfBumpFeeDialog.createObject(root, { txid: root.txid })
} else {
var dialog = cpfpBumpFeeDialog.createObject(root, { txid: root.txid })
}
dialog.open()
}
}
}
Label {
@@ -200,15 +215,6 @@ Pane {
text: txdetails.txpos
}
Label {
text: qsTr('RbF')
color: Material.accentColor
}
Label {
text: txdetails.isFinal ? qsTr('No') : qsTr('Yes')
}
Label {
text: qsTr('Label')
Layout.columnSpan: 2
@@ -345,7 +351,7 @@ Pane {
}
RowLayout {
visible: !txdetails.isMined && !txdetails.isUnrelated
visible: txdetails.canSign || txdetails.canBroadcast
FlatButton {
Layout.fillWidth: true
Layout.preferredWidth: 1
@@ -390,26 +396,6 @@ Pane {
}
}
FlatButton {
Layout.fillWidth: true
text: qsTr('Bump fee')
visible: txdetails.canBump
onClicked: {
var dialog = rbfBumpFeeDialog.createObject(root, { txid: root.txid })
dialog.open()
}
}
FlatButton {
Layout.fillWidth: true
text: qsTr('Bump fee (CPFP)')
visible: txdetails.canCpfp
onClicked: {
var dialog = cpfpBumpFeeDialog.createObject(root, { txid: root.txid })
dialog.open()
}
}
FlatButton {
Layout.fillWidth: true
text: qsTr('Cancel Tx')
@@ -466,6 +452,7 @@ Pane {
onTxaccepted: {
root.rawtx = rbffeebumper.getNewTx()
// TODO: sign & send when possible?
}
onClosed: destroy()
}
@@ -482,7 +469,9 @@ Pane {
}
onTxaccepted: {
root.rawtx = cpfpfeebumper.getNewTx() // TODO: don't replace tx, but push new window
// replaces parent tx with cpfp tx
root.rawtx = cpfpfeebumper.getNewTx()
// TODO: sign & send when possible?
}
onClosed: destroy()
}
@@ -500,6 +489,7 @@ Pane {
onTxaccepted: {
root.rawtx = txcanceller.getNewTx()
// TODO: sign & send when possible?
}
onClosed: destroy()
}