qml: FeePicker: restrict abs/rate editing to mimic wallet.bump_fee/cpfp
This commit is contained in:
@@ -147,6 +147,7 @@ ElDialog {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
finalizer: dialog.cpfpfeebumper
|
finalizer: dialog.cpfpfeebumper
|
||||||
showTxInfo: false
|
showTxInfo: false
|
||||||
|
allowPickerFeeRates: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ ElDialog {
|
|||||||
id: feepicker
|
id: feepicker
|
||||||
width: parent.width
|
width: parent.width
|
||||||
finalizer: dialog.rbffeebumper
|
finalizer: dialog.rbffeebumper
|
||||||
|
allowPickerAbsFees: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ ElDialog {
|
|||||||
id: feepicker
|
id: feepicker
|
||||||
width: parent.width
|
width: parent.width
|
||||||
finalizer: dialog.txcanceller
|
finalizer: dialog.txcanceller
|
||||||
|
allowPickerAbsFees: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ Item {
|
|||||||
|
|
||||||
property bool showTxInfo: true
|
property bool showTxInfo: true
|
||||||
property bool showPicker: true
|
property bool showPicker: true
|
||||||
|
property bool allowPickerAbsFees: true
|
||||||
|
property bool allowPickerFeeRates: true
|
||||||
|
|
||||||
property bool manualFeeEntry: finalizer.method == FeeSlider.FSMethod.MANUAL
|
property bool manualFeeEntry: finalizer.method == FeeSlider.FSMethod.MANUAL
|
||||||
|
|
||||||
@@ -121,24 +123,22 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
RowLayout {
|
||||||
|
Layout.columnSpan: 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 1
|
visible: showPicker && manualFeeEntry && allowPickerFeeRates
|
||||||
text: qsTr('Rate')
|
|
||||||
color: Material.accentColor
|
|
||||||
visible: showPicker && manualFeeEntry
|
|
||||||
}
|
|
||||||
|
|
||||||
GridLayout {
|
Label {
|
||||||
Layout.preferredWidth: 2
|
Layout.fillWidth: true
|
||||||
Layout.rowSpan: 2
|
Layout.preferredWidth: 1
|
||||||
visible: showPicker && manualFeeEntry
|
text: qsTr('Rate')
|
||||||
columns: 2
|
color: Material.accentColor
|
||||||
columnSpacing: constants.paddingMedium
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: rate
|
id: rate
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredWidth: 2
|
||||||
text: finalizer.userFeerate
|
text: finalizer.userFeerate
|
||||||
color: finalizer.isUserFeerateLast ? Material.foreground : Material.accentColor
|
color: finalizer.isUserFeerateLast ? Material.foreground : Material.accentColor
|
||||||
inputMethodHints: Qt.ImhDigitsOnly
|
inputMethodHints: Qt.ImhDigitsOnly
|
||||||
@@ -152,13 +152,28 @@ Item {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredWidth: 1
|
||||||
color: Material.accentColor
|
color: Material.accentColor
|
||||||
text: UI_UNIT_NAME.FEERATE_SAT_PER_VBYTE
|
text: UI_UNIT_NAME.FEERATE_SAT_PER_VBYTE
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
Layout.fillWidth: true
|
||||||
|
visible: showPicker && manualFeeEntry && allowPickerAbsFees
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredWidth: 1
|
||||||
|
color: Material.accentColor
|
||||||
|
text: qsTr('Total')
|
||||||
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: absolute
|
id: absolute
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredWidth: 2
|
||||||
text: finalizer.userFee
|
text: finalizer.userFee
|
||||||
color: finalizer.isUserFeerateLast ? Material.accentColor : Material.foreground
|
color: finalizer.isUserFeerateLast ? Material.accentColor : Material.foreground
|
||||||
inputMethodHints: Qt.ImhDigitsOnly
|
inputMethodHints: Qt.ImhDigitsOnly
|
||||||
@@ -172,18 +187,11 @@ Item {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredWidth: 1
|
||||||
color: Material.accentColor
|
color: Material.accentColor
|
||||||
text: UI_UNIT_NAME.FIXED_SAT
|
text: UI_UNIT_NAME.FIXED_SAT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredWidth: 1
|
|
||||||
visible: showPicker && manualFeeEntry
|
|
||||||
color: Material.accentColor
|
|
||||||
text: qsTr('Total')
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user