Browse Source

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.
master
SomberNight 2 years ago
parent
commit
25c50f15c0
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 5
      electrum/gui/qt/confirm_tx_dialog.py

5
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

Loading…
Cancel
Save