From 490f0b45369e1a9996711d7323e8efdd568a32f8 Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Mon, 7 Jul 2014 14:18:11 -0300 Subject: [PATCH] remove duplicate error --- js/services/controllerUtils.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/js/services/controllerUtils.js b/js/services/controllerUtils.js index aa386b618..96f8322ff 100644 --- a/js/services/controllerUtils.js +++ b/js/services/controllerUtils.js @@ -43,20 +43,15 @@ 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.')); - root.onErrorDigest($scope); - $location.path('addresses'); - }); wallet.on('connectionError', function() { var message = "Looks like you are already connected to this wallet, please logout and try importing it again."; notification.error('PeerJS Error', message); root.onErrorDigest($scope); }); - wallet.on('serverError', function() { - var message = 'The PeerJS server is not responding, please try again'; - notification.error('PeerJS Error', message); - root.onErrorDigest($scope); + wallet.on('serverError', function(m) { + var message = m || 'The PeerJS server is not responding, please try again'; + $location.path('addresses'); + root.onErrorDigest($scope, message); }); wallet.on('ready', function() { $scope.loading = false;