mirror of https://github.com/BTCPrivate/copay.git
bws is moved to preferences->advanced and set it locally
This commit is contained in:
parent
3a2fcaecbc
commit
b2e92b9424
|
@ -115,13 +115,6 @@
|
|||
<span>Enable Glidera Service</span>
|
||||
<switch id="glidera-enabled" name="glideraEnabled" ng-model="glideraEnabled" class="green right"></switch>
|
||||
</li>
|
||||
<li ng-click="$root.go('preferencesBwsUrl')">
|
||||
<span>Bitcore Wallet Service</span>
|
||||
<span class="text-gray db">
|
||||
<i class="icon-arrow-right3 size-24 right"></i>
|
||||
{{preferences.bwsurl}}
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<!-- Disabled for testnet
|
||||
<li ng-show="!index.noFocusedWallet && glideraEnabled">
|
||||
|
|
|
@ -24,6 +24,11 @@
|
|||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||
<span translate>Export Wallet</span>
|
||||
</li>
|
||||
|
||||
<li ng-click="$root.go('preferencesBwsUrl')">
|
||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||
<span translate>Bitcore Wallet Service</span>
|
||||
</li>
|
||||
|
||||
<li ng-click="$root.go('delete')">
|
||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div
|
||||
class="topbar-container"
|
||||
ng-include="'views/includes/topbar.html'"
|
||||
ng-init="titleSection='Bitcore Wallet Service'; goBackToState = 'preferences'; noColor = true">
|
||||
ng-init="titleSection='Bitcore Wallet Service'; goBackToState = 'preferencesAdvanced'; noColor = true">
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
|
||||
function($scope,$log, configService, go, applicationService ) {
|
||||
function($scope, $log, configService, go, applicationService, profileService) {
|
||||
this.error = null;
|
||||
this.success = null;
|
||||
|
||||
var fc = profileService.focusedClient; +
|
||||
var walletId = fc.credentials.walletId; +
|
||||
var defaults = configService.getDefaults();
|
||||
var config = configService.getSync();
|
||||
|
||||
this.bwsurl = config.bws.url;
|
||||
config.bws = config.bws || {};
|
||||
this.bwsurl = config.bws[walletId] || defaults.bws.url;
|
||||
|
||||
this.save = function() {
|
||||
|
||||
|
@ -32,10 +36,9 @@ angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
|
|||
}
|
||||
|
||||
var opts = {
|
||||
bws: {
|
||||
url: this.bwsurl,
|
||||
}
|
||||
bws: {}
|
||||
};
|
||||
opts.bws[walletId] = this.bwsurl;
|
||||
|
||||
configService.set(opts, function(err) {
|
||||
if (err) console.log(err);
|
||||
|
@ -43,6 +46,4 @@ angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
|
|||
applicationService.restart();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue