tqt receive tab: fix update_receive_address_styling - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 5e3e3e41a1e46a324935b544f7473cbd7c7abe71 DIR parent 63217c1ca717faca7e6d54462ce3b9c3cd6522af HTML Author: SomberNight <somber.night@protonmail.com> Date: Thu, 13 Jun 2019 17:33:21 +0200 qt receive tab: fix update_receive_address_styling Diffstat: M electrum/gui/qt/main_window.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- DIR diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py t@@ -1163,7 +1163,13 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): def update_receive_address_styling(self): addr = str(self.receive_address_e.text()) - # note: 'addr' could be ln invoice here + # note: 'addr' could be ln invoice or BIP21 URI + try: + uri = util.parse_URI(addr) + except InvalidBitcoinURI: + pass + else: + addr = uri.get('address') 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. "