Browse Source

qt paytoedit: fixes for pay-to-many (when including "!")

master
SomberNight 6 years ago
parent
commit
b16164da4f
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/gui/qt/main_window.py
  2. 4
      electrum/gui/qt/paytoedit.py

2
electrum/gui/qt/main_window.py

@ -1700,7 +1700,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
return None return None
return clayout.selected_index() return clayout.selected_index()
def lock_amount(self, b): def lock_amount(self, b: bool) -> None:
self.amount_e.setFrozen(b) self.amount_e.setFrozen(b)
self.max_button.setEnabled(not b) self.max_button.setEnabled(not b)

4
electrum/gui/qt/paytoedit.py

@ -182,10 +182,10 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit, Logger):
self.payto_scriptpubkey = None self.payto_scriptpubkey = None
if self.win.max_button.isChecked(): if self.win.max_button.isChecked():
self.win.do_update_fee() self.win.spend_max()
else: else:
self.amount_edit.setAmount(total if outputs else None) self.amount_edit.setAmount(total if outputs else None)
self.win.lock_amount(total or len(lines)>1) self.win.lock_amount(self.win.max_button.isChecked() or bool(outputs))
def get_errors(self) -> Sequence[PayToLineError]: def get_errors(self) -> Sequence[PayToLineError]:
return self.errors return self.errors

Loading…
Cancel
Save