1
0

qt rbf_dialog: set output_value properly

to also show high fee warnings for bump_fee/dscancel flows

fixes https://github.com/spesmilo/electrum/issues/9273
This commit is contained in:
SomberNight
2024-10-22 15:02:31 +00:00
parent 8ec250e527
commit 5f2dab6308
2 changed files with 8 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ class TxEditor(WindowModalDialog):
def __init__(self, *, title='',
window: 'ElectrumWindow',
make_tx,
output_value: Union[int, str] = None,
output_value: Union[int, str],
allow_preview=True):
WindowModalDialog.__init__(self, window, title=title)

View File

@@ -40,11 +40,17 @@ class _BaseRBFDialog(TxEditor):
self.old_tx_size = tx.estimated_size()
self.old_fee_rate = old_fee_rate = self.old_fee / self.old_tx_size # sat/vbyte
output_value = sum([txo.value for txo in tx.outputs() if not txo.is_mine])
if output_value == 0:
output_value = tx.output_value()
TxEditor.__init__(
self,
window=main_window,
title=title,
make_tx=self.rbf_func)
make_tx=self.rbf_func,
output_value=output_value,
)
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)