Wallet/src/js/controllers/preferencesBwsUrl.js

29 lines
674 B
JavaScript
Raw Normal View History

2015-03-06 12:00:10 -03:00
'use strict';
angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
2015-05-04 12:23:43 -03:00
function($scope, configService, isMobile, isCordova, go, applicationService ) {
2015-03-06 12:00:10 -03:00
this.isSafari = isMobile.Safari();
this.isCordova = isCordova;
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-06-11 12:53:38 -03:00
applicationService.restart();
2015-03-06 12:00:10 -03:00
});
};
});