update insight url on network change

This commit is contained in:
Matias Alejo Garcia 2014-06-09 16:58:17 -03:00
parent fabc8aac85
commit e354e6d377
1 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,12 @@ angular.module('copayApp.controllers').controller('SettingsController',
$scope.networkHost = config.network.host;
$scope.networkPort = config.network.port;
$scope.$watch('networkName', function(net) {
$scope.insightHost = net === 'testnet' ? 'test.insight.is' : 'live.insight.is';
});
$scope.save = function() {
var network = config.network;
network.key = $scope.networkKey;