mirror of https://github.com/BTCPrivate/copay.git
fix network error on logout
This commit is contained in:
parent
df6fd7b474
commit
0a4eb0f3be
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue