Browse Source

qt send tab: "max" btn should not raise NotEnoughFunds due to fees

If a tx cannot be constructed due to current fee settings, try to
create one with zero miner fees instead and let user to change the
fee later.

fixes #6755
master
SomberNight 5 years ago
parent
commit
9fced6d2b1
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 9
      electrum/gui/qt/main_window.py

9
electrum/gui/qt/main_window.py

@ -1428,8 +1428,13 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
is_sweep=False) is_sweep=False)
try: try:
tx = make_tx(None) try:
except (NotEnoughFunds, NoDynamicFeeEstimates, MultipleSpendMaxTxOutputs) as e: tx = make_tx(None)
except (NotEnoughFunds, NoDynamicFeeEstimates) as e:
# Check if we had enough funds excluding fees,
# if so, still provide opportunity to set lower fees.
tx = make_tx(0)
except (MultipleSpendMaxTxOutputs, NotEnoughFunds) as e:
self.max_button.setChecked(False) self.max_button.setChecked(False)
self.show_error(str(e)) self.show_error(str(e))
return return

Loading…
Cancel
Save