Fix revoke token

This commit is contained in:
Gustavo Maximiliano Cortez 2015-09-11 15:39:06 -03:00
parent 9a3390b606
commit 0d4c2a5bd9
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
2 changed files with 5 additions and 5 deletions

View File

@ -255,8 +255,8 @@
<ul class="no-bullet m0 size-14"> <ul class="no-bullet m0 size-14">
<h4 class="title m0" translate>Account</h4> <h4 class="title m0" translate>Account</h4>
<li class="line-b p20" ng-click="glidera.revokeToken()"> <li class="line-b p20" ng-click="glidera.revokeToken(index.glideraTestnet)">
<i class="icon-arrow-right3 size-24 right text-gray"></i> <i class="icon-arrow-right3 size-24 right text-gray"></i>
<span class="text-warning" translate>Log out</span> <span class="text-warning" translate>Log out</span>
</li> </li>
</ul> </ul>

View File

@ -39,8 +39,8 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController'
var animatedSlideRight = 'full animated slideInRight'; var animatedSlideRight = 'full animated slideInRight';
} }
this.revokeToken = function() { this.revokeToken = function(testnet) {
var fc = profileService.focusedClient; var network = testnet ? 'testnet' : 'livenet';
var ModalInstanceCtrl = function($scope, $modalInstance) { var ModalInstanceCtrl = function($scope, $modalInstance) {
$scope.ok = function() { $scope.ok = function() {
$modalInstance.close(true); $modalInstance.close(true);
@ -58,7 +58,7 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController'
modalInstance.result.then(function(ok) { modalInstance.result.then(function(ok) {
if (ok) { if (ok) {
storageService.removeGlideraToken(fc.credentials.network, function() { storageService.removeGlideraToken(network, function() {
$timeout(function() { $timeout(function() {
applicationService.restart(); applicationService.restart();
}, 100); }, 100);