From 4989685cb57d36588a597d560d8b57579fc661aa Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Fri, 19 Sep 2014 11:15:45 -0300 Subject: [PATCH] Added network error message when joining a wallet --- js/controllers/join.js | 2 ++ js/models/core/WalletFactory.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/js/controllers/join.js b/js/controllers/join.js index 2de8fa49a..0b66056bb 100644 --- a/js/controllers/join.js +++ b/js/controllers/join.js @@ -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(); diff --git a/js/models/core/WalletFactory.js b/js/models/core/WalletFactory.js index b91853657..62a8f98ab 100644 --- a/js/models/core/WalletFactory.js +++ b/js/models/core/WalletFactory.js @@ -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'); });