fix network error on logout
This commit is contained in:
parent
df6fd7b474
commit
0a4eb0f3be
2 changed files with 10 additions and 10 deletions
|
|
@ -48,16 +48,6 @@ angular.module('copayApp.controllers').controller('HeaderController',
|
||||||
$rootScope.insightError = 0;
|
$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)
|
// Init socket handlers (with no wallet yet)
|
||||||
controllerUtils.setSocketHandlers();
|
controllerUtils.setSocketHandlers();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -252,6 +252,16 @@ angular.module('copayApp.services')
|
||||||
$rootScope.pendingTxCount = pendingForUs;
|
$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) {
|
root._setCommError = function(e) {
|
||||||
if ($rootScope.insightError < 0)
|
if ($rootScope.insightError < 0)
|
||||||
$rootScope.insightError = 0;
|
$rootScope.insightError = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue