refactor on import wallet controllers

This commit is contained in:
Matias Alejo Garcia 2014-11-14 15:05:00 -03:00
commit 45e44fba19
7 changed files with 105 additions and 144 deletions

View file

@ -289,8 +289,8 @@ Identity.prototype.importWalletFromObj = function(obj, opts, cb) {
var w = importFunction(obj, readOpts);
if (!w) return cb(new Error('Could not decrypt'));
this._checkVersion(w.version);
this.addWallet(w);
self._checkVersion(w.version);
self.addWallet(w);
self.bindWallet(w);
self.storeWallet(w, function(err) {
if (err) return cb(err);