diff --git a/config.js b/config.js index 94dc2a829..7b67351bd 100644 --- a/config.js +++ b/config.js @@ -53,12 +53,14 @@ var defaultConfig = { verbose: 1, plugins: { -// LocalStorage: true, - GoogleDrive: true, + LocalStorage: true, + // GoogleDrive: true, }, GoogleDrive: { - clientId: '232630733383-29u1khqf5i8qubhf0homhpb2m14b5lja.apps.googleusercontent.com', + // for localhost: + clientId: '232630733383-a35gcnovnkgka94394i88gq60vtjb4af.apps.googleusercontent.com', + // clientId: '232630733383-29u1khqf5i8qubhf0homhpb2m14b5lja.apps.googleusercontent.com', home: 'copay' }, }; diff --git a/js/controllers/home.js b/js/controllers/home.js index c8a73d862..b0d325448 100644 --- a/js/controllers/home.js +++ b/js/controllers/home.js @@ -4,10 +4,10 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc controllerUtils.redirIfLogged(); - $scope.loading = true; + $scope.retreiving = true; walletFactory.getWallets(function(ret) { - $scope.loading = false; + $scope.retreiving = false; $scope.hasWallets = (ret && ret.length > 0) ? true : false; }); }); diff --git a/js/controllers/open.js b/js/controllers/open.js index 403f4f9fd..e06519e1f 100644 --- a/js/controllers/open.js +++ b/js/controllers/open.js @@ -14,6 +14,7 @@ angular.module('copayApp.controllers').controller('OpenController', function($sc }; $rootScope.fromSetup = false; $scope.loading = false; + $scope.retreiving = true; walletFactory.getWallets(function(wallets) { $scope.wallets = wallets.sort(cmp); @@ -23,6 +24,7 @@ angular.module('copayApp.controllers').controller('OpenController', function($sc walletFactory.storage.getLastOpened(function(ret) { $scope.selectedWalletId = ret || ($scope.wallets[0] && $scope.wallets[0].id); + $scope.retreiving = false; }); }); diff --git a/js/models/Storage.js b/js/models/Storage.js index e23ab530d..f4e19a350 100644 --- a/js/models/Storage.js +++ b/js/models/Storage.js @@ -83,7 +83,6 @@ Storage.prototype.getGlobal = function(k, cb) { preconditions.checkArgument(cb); this.storage.getItem(k, function(item) { -console.log('[Storage.js.96:item:]',item); //TODO cb(item == 'undefined' ? undefined : item); }); }; @@ -121,9 +120,7 @@ Storage.prototype.get = function(walletId, k, cb) { Storage.prototype._readHelper = function(walletId, k, cb) { -console.log('[Storage.js.134:walletId:]',walletId,k); //TODO var wk = this._key(walletId, k); - this._read(wk, function(v){ return cb(v,k); }); @@ -141,10 +138,7 @@ console.log('[Storage.js.142:keys:]',keys); //TODO for (var ii in keys) { this._readHelper(walletId, keys[ii], function(v, k) { ret[k] = v; -console.log('[Storage.js.144:ret:]',k,i,l,v); //TODO if (++i == l) { - -console.log('[Storage.js.157] LKIST', ret); //TODO return cb(ret); } }); @@ -174,11 +168,9 @@ Storage.prototype.getWalletIds = function(cb) { var uniq = {}; this.storage.allKeys(function(keys) { -console.log('[Storage.js.170:keys:]',keys); //TODO for (var ii in keys) { var key = keys[ii]; -console.log('[Storage.js.174:key:]',key); //TODO var split = key.split('::'); if (split.length == 2) { var walletId = split[0]; @@ -201,20 +193,17 @@ Storage.prototype.getWallets = function(cb) { var self = this; this.getWalletIds(function(ids) { -console.log('[Storage.js.197:ids:]',ids); //TODO var l = ids.length, i=0; if (!l) return cb([]); for (var ii in ids) { var id = ids[ii]; -console.log('[Storage.js.206:id:]',id); //TODO self.getName(id, function(name) { wallets.push({ id: id, name: name, }); -console.log('[Storage.js.208:wallets:]',wallets); //TODO if (++i == l) { return cb(wallets); } diff --git a/js/services/walletFactory.js b/js/services/walletFactory.js index 7a6b96ea6..a592470d2 100644 --- a/js/services/walletFactory.js +++ b/js/services/walletFactory.js @@ -1,7 +1,5 @@ 'use strict'; angular.module('copayApp.services').factory('walletFactory', function(pluginManager){ - -console.log('[walletFactory.js.3]'); //TODO return new copay.WalletFactory(config, copay.version, pluginManager); }); diff --git a/plugins/LocalStorage.js b/plugins/LocalStorage.js index a811cfcf4..0035fc12b 100644 --- a/plugins/LocalStorage.js +++ b/plugins/LocalStorage.js @@ -5,7 +5,6 @@ function LocalStorage() { }; LocalStorage.prototype.init = function() { - console.log(' init LocalStorage'); //TODO }; diff --git a/views/home.html b/views/home.html index 972b2618c..7018435e9 100644 --- a/views/home.html +++ b/views/home.html @@ -1,5 +1,9 @@