commit 576954555cc0d226cb914a96f7e54ac761b1af85
parent 84fc4574d6709788b685dcd801c25401676c04e0
Author: ThomasV <thomasv@gitorious>
Date: Fri, 23 Jan 2015 00:18:58 +0100
fix: check_password for imported wallets
Diffstat:
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/electrum b/electrum
@@ -349,23 +349,19 @@ if __name__ == '__main__':
# commands needing password
if cmd.requires_password:
- if wallet.seed == '':
- seed = ''
- password = None
- elif wallet.use_encryption:
+ if wallet.use_encryption:
password = prompt_password('Password:', False)
if not password:
print_msg("Error: Password required")
sys.exit(1)
# check password
try:
- seed = wallet.get_seed(password)
+ seed = wallet.check_password(password)
except InvalidPassword:
print_msg("Error: This password does not decode this wallet.")
sys.exit(1)
else:
password = None
- seed = wallet.get_seed(None)
else:
password = None
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
@@ -2320,7 +2320,7 @@ class ElectrumWindow(QMainWindow):
return
try:
- mnemonic = self.wallet.get_mnemonic(password)
+ self.wallet.check_password(password)
except Exception as e:
QMessageBox.warning(self, _('Error'), str(e), _('OK'))
return