Wallet/src/js/controllers/preferencesGlidera.js

39 lines
1.1 KiB
JavaScript
Raw Normal View History

2015-08-28 18:23:24 -03:00
'use strict';
angular.module('copayApp.controllers').controller('preferencesGlideraController',
function($scope, $timeout, profileService, go, glideraService, storageService) {
this.init = function(token) {
var self = this;
glideraService.getPermissions(token, function(error, permission) {
self.permission = permission;
});
glideraService.getEmail(token, function(error, email) {
self.email = email;
});
glideraService.getPersonalInfo(token, function(error, info) {
self.personalInfo = info;
});
glideraService.getStatus(token, function(error, status) {
self.status = status;
});
glideraService.getLimits(token, function(error, limits) {
self.limits = limits;
});
2015-09-02 16:02:40 -03:00
};
2015-08-28 18:23:24 -03:00
this.revokeToken = function() {
var fc = profileService.focusedClient;
storageService.removeGlideraToken(fc.credentials.network, function() {
$scope.$emit('Local/GlideraTokenUpdated');
$timeout(function() {
go.walletHome();
}, 100);
});
};
});