fix network error on logout

This commit is contained in:
Manuel Araoz 2014-06-30 12:00:14 -03:00
parent df6fd7b474
commit 0a4eb0f3be
2 changed files with 10 additions and 10 deletions

View File

@ -48,16 +48,6 @@ angular.module('copayApp.controllers').controller('HeaderController',
$rootScope.insightError = 0;
$rootScope.$watch('insightError', function(status) {
if (status) {
if (status === -1) {
notification.success('Networking restored', 'Connection to Insight re-established');
} else if (!isNaN(status)) {
notification.error('Networking problem', 'Connection to Insight lost, reconnecting (attempt number ' + status + ')');
}
}
});
// Init socket handlers (with no wallet yet)
controllerUtils.setSocketHandlers();

View File

@ -252,6 +252,16 @@ angular.module('copayApp.services')
$rootScope.pendingTxCount = pendingForUs;
};
$rootScope.$watch('insightError', function(status) {
if (status) {
if (status === -1) {
notification.success('Networking restored', 'Connection to Insight re-established');
} else if (!isNaN(status)) {
notification.error('Networking problem', 'Connection to Insight lost, reconnecting (attempt number ' + status + ')');
}
}
});
root._setCommError = function(e) {
if ($rootScope.insightError < 0)
$rootScope.insightError = 0;