Merge pull request #835 from maraoz/bug/double-errors

remove duplicate error
This commit is contained in:
Matias Alejo Garcia 2014-07-07 14:48:26 -03:00
commit bef6b73207
1 changed files with 4 additions and 9 deletions

View File

@ -43,20 +43,15 @@ angular.module('copayApp.services')
}; };
root.installStartupHandlers = function(wallet, $scope) { 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() { wallet.on('connectionError', function() {
var message = "Looks like you are already connected to this wallet, please logout and try importing it again."; var message = "Looks like you are already connected to this wallet, please logout and try importing it again.";
notification.error('PeerJS Error', message); notification.error('PeerJS Error', message);
root.onErrorDigest($scope); root.onErrorDigest($scope);
}); });
wallet.on('serverError', function() { wallet.on('serverError', function(m) {
var message = 'The PeerJS server is not responding, please try again'; var message = m || 'The PeerJS server is not responding, please try again';
notification.error('PeerJS Error', message); $location.path('addresses');
root.onErrorDigest($scope); root.onErrorDigest($scope, message);
}); });
wallet.on('ready', function() { wallet.on('ready', function() {
$scope.loading = false; $scope.loading = false;