Fix error when connection fail

This commit is contained in:
Gustavo Maximiliano Cortez 2015-09-09 00:02:12 -03:00
commit edbae6f730
3 changed files with 32 additions and 9 deletions

View file

@ -13,6 +13,7 @@ angular.module('copayApp.controllers').controller('glideraController',
var fc = profileService.focusedClient;
var self = this;
this.loading = true;
this.error = null;
$timeout(function() {
glideraService.getToken(code, function(err, data) {
self.loading = null;
@ -72,4 +73,13 @@ angular.module('copayApp.controllers').controller('glideraController',
});
};
this.revokeToken = function() {
var fc = profileService.focusedClient;
storageService.removeGlideraToken(fc.credentials.network, function() {
$timeout(function() {
applicationService.restart();
}, 100);
});
};
});