From 1f1207ecbe1c075028527e2adf73ecac8799480a Mon Sep 17 00:00:00 2001 From: Janus Date: Wed, 23 Jan 2019 18:25:58 +0100 Subject: [PATCH] ln: request_list: post rebase fixup (remove new_request_button deactivation) --- electrum/gui/qt/main_window.py | 3 ++- electrum/gui/qt/request_list.py | 9 +-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index beffdfcea..048d35540 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -1162,7 +1162,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): def update_receive_address_styling(self): addr = str(self.receive_address_e.text()) - if self.wallet.is_used(addr): + # note: 'addr' could be ln invoice here + if is_address(addr) and self.wallet.is_used(addr): self.receive_address_e.setStyleSheet(ColorScheme.RED.as_stylesheet(True)) self.receive_address_e.setToolTip(_("This address has already been used. " "For better privacy, do not reuse it for new payments.")) diff --git a/electrum/gui/qt/request_list.py b/electrum/gui/qt/request_list.py index 04406d2dc..f45fba95a 100644 --- a/electrum/gui/qt/request_list.py +++ b/electrum/gui/qt/request_list.py @@ -113,14 +113,7 @@ class RequestList(MyTreeView): self.parent.expires_combo.show() domain = self.wallet.get_receiving_addresses() - try: - addr = self.wallet.get_unused_address() - except InternalAddressCorruption as e: - self.parent.show_error(str(e)) - addr = '' - if current_address not in domain and addr: - self.parent.set_receive_address(addr) - self.parent.new_request_button.setEnabled(addr != current_address) + self.parent.update_receive_address_styling() self.model().clear()