fix settings autocomplete

This commit is contained in:
Matias Alejo Garcia 2014-06-27 16:23:23 -03:00
parent 03662d9017
commit 7e70541487
1 changed files with 5 additions and 3 deletions

View File

@ -40,12 +40,14 @@ angular.module('copayApp.controllers').controller('SettingsController',
}
$scope.$watch('networkName', function(net) {
$scope.insightHost = net === 'testnet' ? 'test-insight.bitpay.com' : 'insight.bitpay.com';
if (net !== config.networkName)
$scope.insightHost = net === 'testnet' ? 'test-insight.bitpay.com' : 'insight.bitpay.com';
});
$scope.$watch('insightSecure', function(ssl) {
$scope.insightPort = ssl ? 443 : 80;
var l2 = $scope.$watch('insightSecure', function(ssl) {
if (ssl !== config.insightSecure)
$scope.insightPort = ssl ? 443 : 80;
});