Wallet/src/js/controllers/preferencesBwsUrl.js

33 lines
905 B
JavaScript
Raw Normal View History

2015-03-06 12:00:10 -03:00
'use strict';
angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
function($scope, $rootScope, $filter, $timeout, $modal, balanceService, notification, backupService, profileService, configService, isMobile, isCordova, go, rateService, applicationService, bwcService) {
this.isSafari = isMobile.Safari();
this.isCordova = isCordova;
this.hideAdv = true;
this.hidePriv = true;
this.hideSecret = true;
this.error = null;
this.success = null;
var config = configService.getSync();
this.bwsurl = config.bws.url;
this.save = function() {
var opts = {
bws: {
url: this.bwsurl,
}
};
configService.set(opts, function(err) {
if (err) console.log(err);
2015-04-25 12:37:04 -03:00
$scope.$emit('Local/BWSUpdated');
2015-03-06 12:00:10 -03:00
applicationService.restart(true);
go.walletHome();
});
};
});