manual loading and some details fixes

This commit is contained in:
Gabriel Bazán 2016-12-22 12:27:43 -03:00
commit a2c6639962
6 changed files with 58 additions and 85 deletions

View file

@ -783,6 +783,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
invoiceUrl: $scope.paypro.url,
invoiceTime: giftCardInvoiceTime
};
ongoingProcess.set('createGiftCard', true);
debounceCreate(count, dataSrc, onSendStatusChange);
}
}, onSendStatusChange);
@ -795,7 +796,6 @@ angular.module('copayApp.controllers').controller('confirmController', function(
});
var debounceCreateGiftCard = function(count, dataSrc, onSendStatusChange) {
amazonService.createGiftCard(dataSrc, function(err, giftCard) {
$log.debug("creating gift card " + count);
if (err) {
@ -830,6 +830,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
}
amazonService.savePendingGiftCard(newData, null, function(err) {
ongoingProcess.set('createGiftCard', false);
$log.debug("Saving new gift card with status: " + newData.status);
$scope.amazonGiftCard = newData;
});