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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user