rebased to master

This commit is contained in:
Matias Alejo Garcia 2014-10-16 10:30:49 -03:00
commit 09439d1d41
2 changed files with 10 additions and 2 deletions

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('CreateController',
function($scope, $rootScope, $location, $timeout, controllerUtils, backupService, notification) {
function($scope, $rootScope, $location, $timeout, controllerUtils, backupService, notification, defaults) {
$rootScope.fromSetup = true;
$scope.loading = false;
@ -30,6 +30,14 @@ angular.module('copayApp.controllers').controller('CreateController',
updateRCSelect(tc);
});
$scope.$watch('networkName', function(tc) {
$scope.networkUrl = config.network[$scope.networkName].url;
});
$scope.showNetwork = function() {
return $scope.networkUrl != defaults.network.livenet.url && $scope.networkUrl != defaults.network.testnet.url;
};
$scope.create = function(form) {
if (form && form.$invalid) {
notification.error('Error', 'Please enter the required fields');