don't ask pw if wallet is unencrypted
This commit is contained in:
parent
5a4822a044
commit
1d9c8dc519
|
@ -1537,7 +1537,12 @@ class ElectrumWindow(QMainWindow):
|
||||||
text, ok = QInputDialog.getText(self, _('Import private key'), _('Key') + ':')
|
text, ok = QInputDialog.getText(self, _('Import private key'), _('Key') + ':')
|
||||||
if not ok: return
|
if not ok: return
|
||||||
sec = str(text)
|
sec = str(text)
|
||||||
password = self.password_dialog()
|
if self.wallet.use_encryption:
|
||||||
|
password = self.password_dialog()
|
||||||
|
if not password:
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
password = None
|
||||||
try:
|
try:
|
||||||
addr = self.wallet.import_key(sec, password)
|
addr = self.wallet.import_key(sec, password)
|
||||||
if not addr:
|
if not addr:
|
||||||
|
|
Loading…
Reference in New Issue