Browse Source

ln: request_list: post rebase fixup (remove new_request_button deactivation)

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
Janus 6 years ago
committed by ThomasV
parent
commit
1f1207ecbe
  1. 3
      electrum/gui/qt/main_window.py
  2. 9
      electrum/gui/qt/request_list.py

3
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."))

9
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()

Loading…
Cancel
Save