From 06c1640d999b4e62940ce395ff893c5597f2f8e0 Mon Sep 17 00:00:00 2001 From: Yemel Jardi Date: Thu, 19 Jun 2014 16:07:51 -0300 Subject: [PATCH] fix wallet import error message --- js/models/core/WalletFactory.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/models/core/WalletFactory.js b/js/models/core/WalletFactory.js index 8576bb901..769fa47df 100644 --- a/js/models/core/WalletFactory.js +++ b/js/models/core/WalletFactory.js @@ -77,6 +77,8 @@ WalletFactory.prototype.fromEncryptedObj = function(base64, password) { WalletFactory.prototype.import = function(base64, password, cb) { var self = this; var w = self.fromEncryptedObj(base64, password); + + if (!w) return cb(new Error('wrong password')); w.updateIndexes(function(err) { if (err) return cb(err); self.log('Indexes updated');