1
0

fix password dialog, for imported wallets

This commit is contained in:
ThomasV
2014-05-01 12:42:06 +02:00
parent 95fce65e12
commit ace127ee43
3 changed files with 19 additions and 16 deletions

View File

@@ -1072,7 +1072,7 @@ class ElectrumWindow(QMainWindow):
menu.addAction(_("QR code"), lambda: self.show_qrcode("bitcoin:" + addr, _("Address")) )
menu.addAction(_("Edit label"), lambda: self.edit_label(True))
menu.addAction(_("Public keys"), lambda: self.show_public_keys(addr))
if self.wallet.seed:
if not self.wallet.is_watching_only():
menu.addAction(_("Private key"), lambda: self.show_private_key(addr))
menu.addAction(_("Sign/verify message"), lambda: self.sign_verify_message(addr))
#menu.addAction(_("Encrypt/decrypt message"), lambda: self.encrypt_message(addr))

View File

@@ -73,8 +73,8 @@ def make_password_dialog(self, wallet, msg):
def run_password_dialog(self, wallet, parent):
if wallet and not wallet.seed:
QMessageBox.information(parent, _('Error'), _('No seed'), _('OK'))
if wallet.is_watching_only():
QMessageBox.information(parent, _('Error'), _('This is a watching-only wallet'), _('OK'))
return False, None, None
if not self.exec_():
@@ -116,7 +116,7 @@ class PasswordDialog(QDialog):
return
try:
self.wallet.get_seed(password)
self.wallet.check_password(password)
except Exception:
QMessageBox.warning(self.parent, _('Error'), _('Incorrect Password'), _('OK'))
return False, None, None