Fix bitpay card. Replaces the app-name in desktop

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-06 15:14:07 -03:00
commit 5e03f803de
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
9 changed files with 82 additions and 57 deletions

View file

@ -1,15 +1,20 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesBitpayCardController',
function($scope, $ionicModal, bitpayCardService) {
function($scope, $state, $timeout, bitpayCardService, popupService) {
this.logout = function() {
$ionicModal.fromTemplateUrl('views/modals/bitpay-card-confirmation.html', {
scope: $scope,
animation: 'slide-in-up'
}).then(function(modal) {
$scope.bitpayCardConfirmationModal = modal;
$scope.bitpayCardConfirmationModal.show();
$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);
});
};