Moves glidera prefs to tab-settings

This commit is contained in:
Gustavo Maximiliano Cortez 2016-11-22 12:35:51 -03:00
commit df5fb129a2
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
6 changed files with 25 additions and 19 deletions

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesGlideraController',
function($scope, $log, $timeout, $state, ongoingProcess, glideraService, popupService, gettextCatalog) {
function($scope, $log, $timeout, $state, $ionicHistory, ongoingProcess, glideraService, popupService, gettextCatalog) {
$scope.update = function(opts) {
if (!$scope.token || !$scope.permissions) return;
@ -41,8 +41,9 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController'
popupService.showConfirm('Glidera', 'Are you sure you would like to log out of your Glidera account?', null, null, function(res) {
if (res) {
glideraService.removeToken(function() {
$ionicHistory.clearHistory();
$timeout(function() {
$state.go('tabs.buyandsell.glidera');
$state.go('tabs.home');
}, 100);
});
}
@ -52,14 +53,6 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController'
$scope.$on("$ionicView.enter", function(event, data){
$scope.network = glideraService.getEnvironment();
$scope.token = null;
$scope.permissions = null;
$scope.email = null;
$scope.personalInfo = null;
$scope.txs = null;
$scope.status = null;
$scope.limits = null;
ongoingProcess.set('connectingGlidera', true);
glideraService.init($scope.token, function(err, glidera) {
ongoingProcess.set('connectingGlidera');