From edf8e736315493548c57a1d1f8f6fa838e142278 Mon Sep 17 00:00:00 2001 From: Esteban Ordano Date: Mon, 27 Oct 2014 11:57:13 -0300 Subject: [PATCH] fix bad variable name on identity --- js/models/Identity.js | 4 ++-- js/plugins/LocalStorage.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/models/Identity.js b/js/models/Identity.js index 843726495..64bbf6199 100644 --- a/js/models/Identity.js +++ b/js/models/Identity.js @@ -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(); diff --git a/js/plugins/LocalStorage.js b/js/plugins/LocalStorage.js index 5de9aa735..61df027ae 100644 --- a/js/plugins/LocalStorage.js +++ b/js/plugins/LocalStorage.js @@ -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