From 7e70541487ff38e0c0f9de2514b1a9f56ce2bb86 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 27 Jun 2014 16:23:23 -0300 Subject: [PATCH 1/5] fix settings autocomplete --- js/controllers/settings.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/controllers/settings.js b/js/controllers/settings.js index 4011ab768..59e0fc985 100644 --- a/js/controllers/settings.js +++ b/js/controllers/settings.js @@ -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; }); From 1ff057f8926c6fe67591a9cc0c4c1bb9efde1922 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 27 Jun 2014 16:31:45 -0300 Subject: [PATCH 2/5] fix autocomple ssl / port --- index.html | 4 ++-- js/controllers/settings.js | 15 ++++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/index.html b/index.html index a94954c57..da3b31613 100644 --- a/index.html +++ b/index.html @@ -839,7 +839,7 @@
Bitcoin Network - +
@@ -859,7 +859,7 @@ - +
diff --git a/js/controllers/settings.js b/js/controllers/settings.js index 59e0fc985..f4de5e36f 100644 --- a/js/controllers/settings.js +++ b/js/controllers/settings.js @@ -3,7 +3,6 @@ angular.module('copayApp.controllers').controller('SettingsController', function($scope, $rootScope, $window, $location) { $scope.title = 'Settings'; - $scope.networkName = config.networkName; $scope.insightHost = config.blockchain.host; $scope.insightPort = config.blockchain.port; @@ -39,16 +38,14 @@ angular.module('copayApp.controllers').controller('SettingsController', } } - $scope.$watch('networkName', function(net) { - if (net !== config.networkName) - $scope.insightHost = net === 'testnet' ? 'test-insight.bitpay.com' : 'insight.bitpay.com'; - }); + $scope.changeNetwork = function() { + $scope.insightHost = $scope.networkName === 'testnet' ? 'test-insight.bitpay.com' : 'insight.bitpay.com'; + }; - var l2 = $scope.$watch('insightSecure', function(ssl) { - if (ssl !== config.insightSecure) - $scope.insightPort = ssl ? 443 : 80; - }); + $scope.changeInsightSSL = function() { + $scope.insightPort = $scope.insightSecure ? 443 : 80; + }; $scope.save = function() { From 1d45e0fc5d388aef44efaf72843343b3fa2065d1 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 27 Jun 2014 16:44:33 -0300 Subject: [PATCH 3/5] defaults to SSL server of peerjs --- config.js | 6 +++--- index.html | 4 ++-- js/controllers/settings.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config.js b/config.js index f65af3ff4..8a7edd1dd 100644 --- a/config.js +++ b/config.js @@ -26,10 +26,10 @@ var defaultConfig = { // Use this to connect to bitpay's PeerJS server key: 'satoshirocks', - host: '162.242.219.26', - port: 10000, + host: 'copay.io', + port: 9000, path: '/', - secure: false, + secure: true, // other PeerJS config maxPeers: 15, diff --git a/index.html b/index.html index da3b31613..e82c0473f 100644 --- a/index.html +++ b/index.html @@ -871,8 +871,8 @@ - - + +
diff --git a/js/controllers/settings.js b/js/controllers/settings.js index f4de5e36f..b38252d5d 100644 --- a/js/controllers/settings.js +++ b/js/controllers/settings.js @@ -11,7 +11,7 @@ angular.module('copayApp.controllers').controller('SettingsController', $scope.networkHost = config.network.host; $scope.networkPort = config.network.port; $scope.networkSecure = config.network.secure || false; - $scope.disableVideo = config.disableVideo || true; + $scope.disableVideo = typeof config.disableVideo === undefined ? true : config.disableVideo; $scope.unitOpts = [{ name: 'Satoshis (100,000,000 satoshis = 1BTC)', @@ -39,12 +39,12 @@ angular.module('copayApp.controllers').controller('SettingsController', } $scope.changeNetwork = function() { - $scope.insightHost = $scope.networkName === 'testnet' ? 'test-insight.bitpay.com' : 'insight.bitpay.com'; + $scope.insightHost = $scope.networkName !== 'testnet' ? 'test-insight.bitpay.com' : 'insight.bitpay.com'; }; $scope.changeInsightSSL = function() { - $scope.insightPort = $scope.insightSecure ? 443 : 80; + $scope.insightPort = $scope.insightSecure ? 80 : 443; }; From fd6a2c19b26fe3b8ec24018392fe0abaa9323b41 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 27 Jun 2014 17:09:12 -0300 Subject: [PATCH 4/5] fix disable video options --- config.js | 2 +- index.html | 2 +- js/services/controllerUtils.js | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config.js b/config.js index 8a7edd1dd..5ae9d1252 100644 --- a/config.js +++ b/config.js @@ -118,6 +118,6 @@ var defaultConfig = { // theme list themes: ['default'], - disableVideo: 1, + disableVideo: true, verbose: 1, }; diff --git a/index.html b/index.html index e82c0473f..bd3604958 100644 --- a/index.html +++ b/index.html @@ -851,7 +851,7 @@
Videoconferencing - +
Insight API server diff --git a/js/services/controllerUtils.js b/js/services/controllerUtils.js index cbc293a1f..5faba8313 100644 --- a/js/services/controllerUtils.js +++ b/js/services/controllerUtils.js @@ -44,8 +44,7 @@ angular.module('copayApp.services') root.installStartupHandlers = function(wallet, $scope) { wallet.on('serverError', function(msg) { - notification.error('PeerJS Error', 'There was an error connecting to the PeerJS server.' - + (msg || 'Check you settings and Internet connection.')); + notification.error('PeerJS Error', 'There was an error connecting to the PeerJS server.' + (msg || 'Check you settings and Internet connection.')); root.onErrorDigest($scope); $location.path('addresses'); }); From 35c360b4051d8241394345426d1d1d560c2da20c Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 27 Jun 2014 17:25:02 -0300 Subject: [PATCH 5/5] revert to non ssl peerjs --- config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config.js b/config.js index 5ae9d1252..14d03b91a 100644 --- a/config.js +++ b/config.js @@ -26,10 +26,13 @@ var defaultConfig = { // Use this to connect to bitpay's PeerJS server key: 'satoshirocks', - host: 'copay.io', - port: 9000, + host: '162.242.219.26', + port: 10000, + secure: false, + // host: 'copay.io', + // port: 9000, + // secure: true, path: '/', - secure: true, // other PeerJS config maxPeers: 15,