From 25c50f15c0bd24e091180036968dadf8d8af9536 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 22 Dec 2023 23:50:04 +0000 Subject: [PATCH] qt TxEditor: fix extraneous "not able to RBF later" warning Imported wallets, and HD wallets with "use change" disabled, would always get the warning before. --- electrum/gui/qt/confirm_tx_dialog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/confirm_tx_dialog.py b/electrum/gui/qt/confirm_tx_dialog.py index bd7df229b..a720b9093 100644 --- a/electrum/gui/qt/confirm_tx_dialog.py +++ b/electrum/gui/qt/confirm_tx_dialog.py @@ -570,9 +570,12 @@ class TxEditor(WindowModalDialog): messages.append(_('This payment will be merged with another existing transaction.')) # warn if we use multiple change outputs num_change = sum(int(o.is_change) for o in self.tx.outputs()) + num_ismine = sum(int(o.is_mine) for o in self.tx.outputs()) if num_change > 1: messages.append(_('This transaction has {} change outputs.'.format(num_change))) - if num_change == 0: + # warn if there is no ismine output, as it might be problematic to RBF the tx later. + # (though RBF is still possible by adding new inputs, if the wallet has more utxos) + if num_ismine == 0: messages.append(_('Make sure you pay enough mining fees; you will not be able to bump the fee later.')) # TODO: warn if we send change back to input address