refactor bws url structure on local storage

This commit is contained in:
Javier 2015-10-20 13:39:56 -03:00
parent 4042d04f1b
commit 42fd03faff
2 changed files with 5 additions and 4 deletions

View File

@ -36,9 +36,9 @@ angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
}
var opts = {
bws: {}
bwsFor: {}
};
opts.bws[walletId] = this.bwsurl;
opts.bwsFor[walletId] = this.bwsurl;
configService.set(opts, function(err) {
if (err) console.log(err);

View File

@ -254,10 +254,11 @@ angular.module('copayApp.services')
root.storeData = function(walletClient, bwsurl, cb) {
var walletId = walletClient.credentials.walletId;
var defaults = configService.getDefaults();
var opts_ = {
bws: {}
bwsFor: {}
};
opts_.bws[walletId] = bwsurl;
opts_.bwsFor[walletId] = bwsurl || defaults.bws.url;
configService.set(opts_, function(err) {
if (err) console.log(err);