rm log and refactor baseurl
This commit is contained in:
parent
e0a43bd90d
commit
205d1e78c3
2 changed files with 9 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue