Merge pull request #1930 from cmgustavo/feature/pin-01

PIN for mobile devices
This commit is contained in:
Matias Alejo Garcia 2014-12-03 23:56:10 -03:00
commit 6f1342ea27
21 changed files with 589 additions and 130 deletions

View file

@ -355,17 +355,17 @@ Identity.prototype.remove = function(opts, cb) {
};
Identity.prototype._cleanUp = function() {
// NOP
_.each(this.wallets, function(w){
w.close();
});
};
/**
* @desc Closes the wallet and disconnects all services
*/
Identity.prototype.close = function() {
var self = this;
self.store({}, function(err) {
self.emitAndKeepAlive('closed');
});
this._cleanUp();
this.emitAndKeepAlive('closed');
};