From 0d4c2a5bd9b3fd97eb530dc5aa6ce3324ccc2b0c Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Fri, 11 Sep 2015 15:39:06 -0300 Subject: [PATCH] Fix revoke token --- public/views/preferencesGlidera.html | 4 ++-- src/js/controllers/preferencesGlidera.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/views/preferencesGlidera.html b/public/views/preferencesGlidera.html index 818dd4b91..ff8a0de7b 100644 --- a/public/views/preferencesGlidera.html +++ b/public/views/preferencesGlidera.html @@ -255,8 +255,8 @@ diff --git a/src/js/controllers/preferencesGlidera.js b/src/js/controllers/preferencesGlidera.js index b90ae39c0..ecc39ee08 100644 --- a/src/js/controllers/preferencesGlidera.js +++ b/src/js/controllers/preferencesGlidera.js @@ -39,8 +39,8 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController' var animatedSlideRight = 'full animated slideInRight'; } - this.revokeToken = function() { - var fc = profileService.focusedClient; + this.revokeToken = function(testnet) { + var network = testnet ? 'testnet' : 'livenet'; var ModalInstanceCtrl = function($scope, $modalInstance) { $scope.ok = function() { $modalInstance.close(true); @@ -58,7 +58,7 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController' modalInstance.result.then(function(ok) { if (ok) { - storageService.removeGlideraToken(fc.credentials.network, function() { + storageService.removeGlideraToken(network, function() { $timeout(function() { applicationService.restart(); }, 100);