qt receive tab: fix update_receive_address_styling
This commit is contained in:
@@ -1163,7 +1163,13 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
|
|||||||
|
|
||||||
def update_receive_address_styling(self):
|
def update_receive_address_styling(self):
|
||||||
addr = str(self.receive_address_e.text())
|
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):
|
if is_address(addr) and self.wallet.is_used(addr):
|
||||||
self.receive_address_e.setStyleSheet(ColorScheme.RED.as_stylesheet(True))
|
self.receive_address_e.setStyleSheet(ColorScheme.RED.as_stylesheet(True))
|
||||||
self.receive_address_e.setToolTip(_("This address has already been used. "
|
self.receive_address_e.setToolTip(_("This address has already been used. "
|
||||||
|
|||||||
Reference in New Issue
Block a user