diff --git a/src/js/controllers/preferencesBwsUrl.js b/src/js/controllers/preferencesBwsUrl.js index 7d5d5465c..48e364bb9 100644 --- a/src/js/controllers/preferencesBwsUrl.js +++ b/src/js/controllers/preferencesBwsUrl.js @@ -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); diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index f108f0e38..f86aeb56a 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -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);