refactor bws url structure on local storage
This commit is contained in:
parent
4042d04f1b
commit
42fd03faff
2 changed files with 5 additions and 4 deletions
|
|
@ -36,9 +36,9 @@ angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
|
||||||
}
|
}
|
||||||
|
|
||||||
var opts = {
|
var opts = {
|
||||||
bws: {}
|
bwsFor: {}
|
||||||
};
|
};
|
||||||
opts.bws[walletId] = this.bwsurl;
|
opts.bwsFor[walletId] = this.bwsurl;
|
||||||
|
|
||||||
configService.set(opts, function(err) {
|
configService.set(opts, function(err) {
|
||||||
if (err) console.log(err);
|
if (err) console.log(err);
|
||||||
|
|
|
||||||
|
|
@ -254,10 +254,11 @@ angular.module('copayApp.services')
|
||||||
|
|
||||||
root.storeData = function(walletClient, bwsurl, cb) {
|
root.storeData = function(walletClient, bwsurl, cb) {
|
||||||
var walletId = walletClient.credentials.walletId;
|
var walletId = walletClient.credentials.walletId;
|
||||||
|
var defaults = configService.getDefaults();
|
||||||
var opts_ = {
|
var opts_ = {
|
||||||
bws: {}
|
bwsFor: {}
|
||||||
};
|
};
|
||||||
opts_.bws[walletId] = bwsurl;
|
opts_.bwsFor[walletId] = bwsurl || defaults.bws.url;
|
||||||
configService.set(opts_, function(err) {
|
configService.set(opts_, function(err) {
|
||||||
if (err) console.log(err);
|
if (err) console.log(err);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue