Merge pull request #1436 from cmgustavo/bug/connection-error

Added "network error" message when joining a wallet
This commit is contained in:
Matias Alejo Garcia 2014-09-22 09:57:16 -03:00
commit 2da79f9ce4
2 changed files with 6 additions and 0 deletions

View File

@ -130,6 +130,8 @@ angular.module('copayApp.controllers').controller('JoinController',
notification.error('Network Error', 'Wallet network configuration missmatch');
else if (err === 'badSecret')
notification.error('Bad secret', 'The secret string you entered is invalid');
else if (err === 'connectionError')
notification.error('Networking Error', 'Could not connect to the Insight server. Check your settings and network configuration');
else
notification.error('Unknown error');
controllerUtils.onErrorDigest();

View File

@ -371,6 +371,10 @@ WalletFactory.prototype.joinCreateSession = function(secret, nickname, passphras
connectedOnce = true;
});
joinNetwork.on('connect_error', function() {
return cb('connectionError');
});
joinNetwork.on('serverError', function() {
return cb('joinError');
});