From 205d1e78c30d5dfb16e2113fb9f574cbe7d3fc81 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 3 Jun 2016 09:38:57 -0300 Subject: [PATCH] rm log and refactor baseurl --- src/js/services/profileService.js | 17 +++++++++-------- src/js/services/storageService.js | 1 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index e3238db97..f14acff19 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -62,23 +62,24 @@ angular.module('copayApp.services') }); }; - root._getBaseURL = function(walletId) { - var config = configService.getSync(); - var defaults = configService.getDefaults(); - - return ((config.bwsFor && config.bwsFor[walletId]) || defaults.bws.url); - } - root.setWalletClient = function(credentials) { if (root.walletClients[credentials.walletId] && root.walletClients[credentials.walletId].started) { return; } + + var getBaseURL = function(walletId) { + var config = configService.getSync(); + var defaults = configService.getDefaults(); + + return ((config.bwsFor && config.bwsFor[walletId]) || defaults.bws.url); + }; + $log.debug('Importing wallet:' + credentials.walletId); var skipKeyValidation = root.profile.checked[credentials.walletId] == platformInfo.ua; var client = bwcService.getClient(JSON.stringify(credentials), { - baseurl: root._getBaseURL(credentials.walletId), + baseurl: getBaseURL(credentials.walletId), skipKeyValidation: skipKeyValidation, }); root.walletClients[credentials.walletId] = client; diff --git a/src/js/services/storageService.js b/src/js/services/storageService.js index 4b9b91b33..d80a0f78d 100644 --- a/src/js/services/storageService.js +++ b/src/js/services/storageService.js @@ -113,7 +113,6 @@ angular.module('copayApp.services') }; root.storeProfile = function(profile, cb) { -console.log('[storageService.js.115:storeProfile:]',profile); //TODO encryptOnMobile(profile.toObj(), function(err, x) { storage.set('profile', x, cb); });