"Show QR code" only for "new" addresses

This commit is contained in:
Kristaps Kaupe 2019-11-13 02:51:24 +02:00
parent 27c2cd6a4a
commit 334b34d77b
No known key found for this signature in database
GPG key ID: D47B1B4232B55437

View file

@ -1171,8 +1171,10 @@ class JMWalletTab(QWidget):
if address_valid:
menu.addAction("Copy address to clipboard",
lambda: app.clipboard().setText(txt))
menu.addAction("Show QR code",
lambda: self.openQRCodePopup(txt))
# Show QR code option only for new addresses to avoid address reuse
if item.text(3) == "new":
menu.addAction("Show QR code",
lambda: self.openQRCodePopup(txt))
if xpub_exists:
menu.addAction("Copy extended pubkey to clipboard",
lambda: app.clipboard().setText(xpub))