Fix bitpay card. Replaces the app-name in desktop
This commit is contained in:
parent
2354a46bed
commit
5e03f803de
9 changed files with 82 additions and 57 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('bitpayCardController', function($scope, $timeout, $log, lodash, bitpayCardService, configService, profileService, walletService, ongoingProcess, pbkdf2Service, moment, popupService) {
|
||||
angular.module('copayApp.controllers').controller('bitpayCardController', function($scope, $timeout, $log, lodash, bitpayCardService, configService, profileService, walletService, ongoingProcess, pbkdf2Service, moment, popupService, gettextCatalog, bwcError) {
|
||||
|
||||
var self = this;
|
||||
var wallet;
|
||||
|
|
@ -168,6 +168,7 @@ angular.module('copayApp.controllers').controller('bitpayCardController', functi
|
|||
};
|
||||
|
||||
walletService.createTx(wallet, txp, function(err, createdTxp) {
|
||||
ongoingProcess.set('Processing Transaction...', false);
|
||||
if (err) {
|
||||
popupService.showAlert(gettextCatalog.getString('Error'), bwcError.msg(err));
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue