1
0

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.
This commit is contained in:
SomberNight
2023-12-22 23:50:04 +00:00
parent 4908c8c389
commit 25c50f15c0

View File

@@ -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