commit 1f1207ecbe1c075028527e2adf73ecac8799480a
parent 02798aeb397b7d724d64b4467c96940147ba89fa
Author: Janus <ysangkok@gmail.com>
Date: Wed, 23 Jan 2019 18:25:58 +0100
ln: request_list: post rebase fixup (remove new_request_button deactivation)
Diffstat:
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git 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
@@ -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()