Wallet/src/js/controllers/preferencesBitpayCard.js

21 lines
585 B
JavaScript
Raw Normal View History

2016-08-10 15:29:31 -03:00
'use strict';
angular.module('copayApp.controllers').controller('preferencesBitpayCardController',
function($scope, $state, $timeout, 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?';
popupService.showConfirm(title, null, function(res) {
if (res) logout();
});
};
var logout = function() {
bitpayCardService.logout(function() {
$timeout(function() {
$state.go('bitpayCard.main');
}, 100);
2016-08-10 15:29:31 -03:00
});
};
});