Skip to content

qml: allow manual editing of fee/feerate#10371

Merged
SomberNight merged 5 commits intospesmilo:masterfrom
accumulator:qml_manual_fee_feerate_edit
Jan 15, 2026
Merged

qml: allow manual editing of fee/feerate#10371
SomberNight merged 5 commits intospesmilo:masterfrom
accumulator:qml_manual_fee_feerate_edit

Conversation

@accumulator
Copy link
Copy Markdown
Member

@accumulator accumulator commented Dec 17, 2025

also improve warning box styling consistency across finalizers,
add CPFP new feerate > old feerate check,
add relayfee checks for CPFP, DSCancel,
proper warning string for no dynamic fee estimates.

fixes #6710 #10273

@accumulator accumulator marked this pull request as draft December 17, 2025 11:00
@accumulator
Copy link
Copy Markdown
Member Author

marked as draft, missing filtering invalid alphanumeric input

@accumulator accumulator marked this pull request as ready for review December 17, 2025 11:09
@accumulator accumulator force-pushed the qml_manual_fee_feerate_edit branch 3 times, most recently from 0c5ba67 to 17ae77b Compare December 17, 2025 12:44
also improve warning box styling consistency across finalizers,
add CPFP new feerate > old feerate check,
add relayfee checks for CPFP, DSCancel,
proper warning string for no dynamic fee estimates
@accumulator accumulator force-pushed the qml_manual_fee_feerate_edit branch from 17ae77b to fffcf4a Compare December 18, 2025 07:33
Comment thread electrum/gui/qml/qetxfinalizer.py
Copy link
Copy Markdown
Member

@f321x f321x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this on android, lgtm.
Related to this, we seem to allow broadcasting a tx on QML when showing a warning (e.g. too low relayfee), which then fails with a server error, while disabling the Broadcast/Pay button in Qt.
Should this be unified?

@accumulator
Copy link
Copy Markdown
Member Author

we seem to allow broadcasting a tx on QML when showing a warning (e.g. too low relayfee), which then fails with a server error, while disabling the Broadcast/Pay button in Qt. Should this be unified?

This sounds like a bug

Copy link
Copy Markdown
Member

@SomberNight SomberNight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good, but have some comments.

Comment thread electrum/gui/qml/components/controls/FeePicker.qml
Comment thread electrum/gui/qml/components/controls/FeePicker.qml Outdated
Comment on lines +177 to +182
Label {
Layout.preferredWidth: 1
visible: showPicker && manualFeeEntry
color: Material.accentColor
text: qsTr('Total')
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This layout seems very brittle and magic o.O
So there is a grid with 2 columns: we put the "Rate" label into it. Then we put a sub-grid into it which spans two rows. Then we put the "Total" label into it, expecting it to be just under "Rate" and to the left of the sub-grid. o.O
It works atm but if I try to do the subtlest change, it breaks :/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the layout in 8a3d9fd

it looks a bit worse as it is not column-aligned :( but at least it behaves predictably >.<

Comment on lines +138 to +149
TextField {
id: rate
Layout.fillWidth: true
text: finalizer.userFeerate
inputMethodHints: Qt.ImhDigitsOnly
validator: RegularExpressionValidator {
regularExpression: /^[0-9]*\.[0-9]?$/
}
onTextEdited: {
finalizer.userFeerate = text
}
}
Copy link
Copy Markdown
Member

@SomberNight SomberNight Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the desktop Qt GUI does not always expose editing both the feerate and abs fee.

  • for simple-sends, it exposes both
  • for RBF bump-fee and dscancel, it only exposes feerate
  • for CPFP, it only exposes abs fee

This is because the underlying wallet.py methods are limited accordingly. E.g. wallet.bump_fee wants a feerate.

The problem with exposing both as done by this PR currently is that it is lying to the user in a kind of unexpected way. Try the RbfBumpFeeDialog: in manual fee edit mode, start increasing the absolute fee by 1 satoshi a time: +1 sat, +1 sat, +1 sat. Observe that the actual abs fee does not increase, only occasionally. The calculation relies on the feerate with a 0.1 sat/vbyte precision to be an intermediate value: so the actual abs fee can only be changed with a granularity of ~15 sats (depending on tx size -- it is only the feerate that the user can truly change)

somewhat related: ce8f564

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a patch that tries to tackle this, but it breaks the layout (hence my other comment that the layout is brittle :D)
See 154b704

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 8a3d9fd

Copy link
Copy Markdown
Member

@SomberNight SomberNight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the work here.

It only took us 10 years to add precise fee selection to the Android app! :D
I think a lot of users will be happy :)

@SomberNight SomberNight merged commit 5266b3d into spesmilo:master Jan 15, 2026
16 checks passed
@SomberNight SomberNight added this to the 4.7.0 milestone Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android: Allow manually editing fee rates and selecting the fee method directly on fee menu pop-up (custom fee, qml)

3 participants