commit
17614d2968
13 changed files with 162 additions and 32 deletions
|
|
@ -122,7 +122,7 @@ Identity.open = function(opts, cb) {
|
|||
|
||||
var storage = opts.storage || opts.pluginManager.get('DB');
|
||||
storage.setCredentials(opts.email, opts.password, opts);
|
||||
storage.getItem(Identity.getKeyForEmail(opts.email), function(err, data) {
|
||||
storage.getItem(Identity.getKeyForEmail(opts.email), function(err, data, headers) {
|
||||
var exported;
|
||||
if (err) {
|
||||
return cb(err);
|
||||
|
|
@ -132,7 +132,7 @@ Identity.open = function(opts, cb) {
|
|||
} catch (e) {
|
||||
return cb(e);
|
||||
}
|
||||
return cb(null, new Identity(_.extend(opts, exported)));
|
||||
return cb(null, new Identity(_.extend(opts, exported)), headers);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -619,11 +619,10 @@ Identity.prototype.deleteWallet = function(walletId, cb) {
|
|||
delete this.focusedTimestamps[walletId];
|
||||
|
||||
this.storage.removeItem(Wallet.getStorageKey(walletId), function(err) {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
if (err) return cb(err);
|
||||
self.emitAndKeepAlive('deletedWallet', walletId);
|
||||
self.store(null, cb);
|
||||
return cb();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue