Removed constants from app.js, now takes the values from config.js and makes the injectable.

This commit is contained in:
ssotomayor 2014-10-14 17:03:09 -03:00
commit b25633eb70
2 changed files with 2 additions and 5 deletions

View file

@ -38,10 +38,7 @@ if (Object.keys(config.plugins).length)
var copayApp = window.copayApp = angular.module('copayApp', modules); var copayApp = window.copayApp = angular.module('copayApp', modules);
copayApp.value('defaults', { copayApp.value('defaults', defaultConfig);
livenetUrl: 'https://insight.bitpay.com:443',
testnetUrl: 'https://test-insight.bitpay.com:443'
});
copayApp.config(function($sceDelegateProvider) { copayApp.config(function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([ $sceDelegateProvider.resourceUrlWhitelist([

View file

@ -37,7 +37,7 @@ angular.module('copayApp.controllers').controller('CreateController',
}); });
$scope.showNetwork = function(){ $scope.showNetwork = function(){
return $scope.networkUrl != defaults.livenetUrl && $scope.networkUrl != defaults.testnetUrl; return $scope.networkUrl != defaults.network.livenet.url && $scope.networkUrl != defaults.network.testnet.url;
}; };
$scope.create = function(form) { $scope.create = function(form) {