Wallet/src/js/controllers/preferencesBitpayCard.js

22 lines
642 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() {
2016-10-05 11:42:40 -03:00
var msg = 'Are you sure you would like to log out of your BitPay Card account?';
popupService.showConfirm(null, msg, 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
});
};
});