fix bad variable name on identity
This commit is contained in:
parent
cf2615bb88
commit
edf8e73631
2 changed files with 4 additions and 4 deletions
|
|
@ -209,14 +209,14 @@ Identity.isAvailable = function(email, opts, cb) {
|
|||
* @param {Function} cb
|
||||
*/
|
||||
Identity.prototype.storeWallet = function(wallet, cb) {
|
||||
preconditions.checkArgument(w && _.isObject(wallet));
|
||||
preconditions.checkArgument(wallet && _.isObject(wallet));
|
||||
|
||||
var val = wallet.toObj();
|
||||
var key = wallet.getStorageKey();
|
||||
|
||||
this.storage.setItem(key, val, function(err) {
|
||||
if (err) {
|
||||
log.debug('Wallet:' + w.getName() + ' couldnt be stored');
|
||||
log.debug('Wallet:' + wallet.getName() + ' couldnt be stored');
|
||||
return cb(err);
|
||||
}
|
||||
return cb();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ LocalStorage.prototype.setCredentials = function(email, password, opts) {
|
|||
};
|
||||
|
||||
LocalStorage.prototype.getItem = function(k,cb) {
|
||||
return cb(localStorage.getItem(k));
|
||||
return cb(null, localStorage.getItem(k));
|
||||
};
|
||||
|
||||
LocalStorage.prototype.setItem = function(k,v,cb) {
|
||||
|
|
@ -38,7 +38,7 @@ LocalStorage.prototype.allKeys = function(cb) {
|
|||
for(var i=0; i<l; i++)
|
||||
ret.push(localStorage.key(i));
|
||||
|
||||
return cb(ret);
|
||||
return cb(null, ret);
|
||||
};
|
||||
|
||||
module.exports = LocalStorage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue