Merge pull request #720 from yemel/fix/wallet-import

Fix error message on wallet import (wrong password)
This commit is contained in:
Matias Alejo Garcia 2014-06-19 17:22:01 -03:00
commit 78493f9d91
1 changed files with 2 additions and 0 deletions

View File

@ -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');