Updated for 1.3.6.

This commit is contained in:
Andy Phillipson 2017-02-09 14:58:47 -05:00
commit ff56fc2bee
7 changed files with 62 additions and 123 deletions

View file

@ -15,7 +15,7 @@ angular.module('copayApp.controllers').controller('bitpayCardIntroController', f
return;
}
if (paired) {
bitpayCardService.sync(apiContext, function(err, data) {
bitpayCardService.sync(apiContext, function(err, cards) {
if (err) {
popupService.showAlert(gettextCatalog.getString('Error updating Debit Cards'), err);
return;
@ -26,9 +26,9 @@ angular.module('copayApp.controllers').controller('bitpayCardIntroController', f
disableAnimate: true
});
$state.go('tabs.home').then(function() {
if (data.cards[0]) {
if (cards[0]) {
$state.transitionTo('tabs.bitpayCard', {
id: data.cards[0].id
id: cards[0].id
});
}
});
@ -78,7 +78,7 @@ angular.module('copayApp.controllers').controller('bitpayCardIntroController', f
if (account == undefined) {
startPairBitPayAccount();
} else {
bitpayCardService.fetchBitpayDebitCards(account.apiContext, function(err, data) {
bitpayCardService.sync(account.apiContext, function(err, data) {
if (err) {
popupService.showAlert(gettextCatalog.getString('Error'), err);
return;

View file

@ -45,7 +45,7 @@ angular.module('copayApp.controllers').controller('preferencesBitpayServicesCont
};
var removeCard = function(card) {
bitpayCardService.removeCard(card, function(err) {
bitpayCardService.remove(card.id, function(err) {
if (err) {
return popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Could not remove card'));
}
@ -54,13 +54,13 @@ angular.module('copayApp.controllers').controller('preferencesBitpayServicesCont
};
var setScope = function(cb) {
bitpayAccountService.getAccounts(function(err, data) {
bitpayAccountService.getAccounts(function(err, accounts) {
if (err) return;
$scope.bitpayAccounts = data;
$scope.bitpayAccounts = accounts;
bitpayCardService.getBitpayDebitCards(function(err, data) {
bitpayCardService.getCards(function(err, cards) {
if (err) return;
$scope.bitpayCards = data;
$scope.bitpayCards = cards;
if (cb) {
cb();
}