mirror of https://github.com/BTCPrivate/copay.git
refactor bws url structure on local storage
This commit is contained in:
parent
4042d04f1b
commit
42fd03faff
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue