Browse Source

qt bump fee: disable targeting an abs fee. only allow setting feerate

wallet.bump_fee() only allows targeting a feerate.
Prior to this commit, _BaseRBFDialog(TxEditor) allowed setting either a feerate or an abs fee.
When setting an abs fee, TxEditor.update_fee_fields() tries to adjust the feerate accordingly,
and then via side-effecting, wallet.bump_fee() will get called with the derived feerate.
This seems really buggy atm. I think it is best to disable setting abs fees, and
if we want to enable it later, targeting needs to be implemented in wallet.bump_fee() -
just like how it works in ConfirmTxDialog(TxEditor) and wallet.make_unsigned_transaction().
master
SomberNight 3 years ago
parent
commit
ce8f564fb4
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 1
      electrum/gui/qt/rbf_dialog.py

1
electrum/gui/qt/rbf_dialog.py

@ -49,6 +49,7 @@ class _BaseRBFDialog(TxEditor):
title=title,
make_tx=self.rbf_func)
self.fee_e.setFrozen(True) # disallow setting absolute fee for now, as wallet.bump_fee can only target feerate
new_fee_rate = self.old_fee_rate + max(1, self.old_fee_rate // 20)
self.feerate_e.setAmount(new_fee_rate)
self.update()

Loading…
Cancel
Save