Add retry connection to peerjs server on login
This commit is contained in:
parent
45ffa94bbe
commit
9b5e155192
4 changed files with 38 additions and 5 deletions
|
|
@ -25,6 +25,10 @@ angular.module('copayApp.controllers').controller('ImportController',
|
|||
var message = "Looks like you are already connected to this wallet, please logout from it and try importing it again.";
|
||||
$rootScope.$flashMessage = { message: message, type: 'error'};
|
||||
});
|
||||
$rootScope.wallet.on('serverError', function() {
|
||||
$rootScope.$flashMessage = { message: 'The PeerJS server is not responding, please try again', type: 'error'};
|
||||
controllerUtils.onErrorDigest();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ angular.module('copayApp.controllers').controller('SigninController',
|
|||
$rootScope.$flashMessage = { message: 'Bad secret secret string', type: 'error'};
|
||||
else
|
||||
$rootScope.$flashMessage = { message: 'Unknown error', type: 'error'};
|
||||
controllerUtils.onErrorDigest();
|
||||
controllerUtils.onErrorDigest();
|
||||
} else {
|
||||
controllerUtils.startNetwork(w);
|
||||
installStartupHandlers(w);
|
||||
|
|
@ -77,6 +77,10 @@ angular.module('copayApp.controllers').controller('SigninController',
|
|||
wallet.on('ready', function() {
|
||||
$scope.loading = false;
|
||||
});
|
||||
wallet.on('serverError', function() {
|
||||
$rootScope.$flashMessage = { message: 'The PeerJS server is not responding, please try again', type: 'error'};
|
||||
controllerUtils.onErrorDigest($scope);
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue