rm log and refactor baseurl

This commit is contained in:
Matias Alejo Garcia 2016-06-03 09:38:57 -03:00
commit 205d1e78c3
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
2 changed files with 9 additions and 9 deletions

View file

@ -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;

View file

@ -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);
});