Wallet/src/js/controllers/preferencesBitpayCard.js

22 lines
646 B
JavaScript
Raw Normal View History

2016-08-10 15:29:31 -03:00
'use strict';
angular.module('copayApp.controllers').controller('preferencesBitpayCardController',
2016-09-28 21:09:41 -03:00
function($scope, $state, $timeout, $ionicHistory, bitpayCardService, popupService) {
2016-08-10 15:29:31 -03:00
$scope.logout = function() {
var title = 'Are you sure you would like to log out of your Bitpay Card account?';
2016-09-12 13:58:36 -03:00
popupService.showConfirm(title, null, null, null, function(res) {
if (res) logout();
});
};
var logout = function() {
bitpayCardService.logout(function() {
2016-09-28 21:09:41 -03:00
$ionicHistory.removeBackView();
$timeout(function() {
2016-09-28 21:09:41 -03:00
$state.go('tabs.home');
}, 100);
2016-08-10 15:29:31 -03:00
});
};
});