amazon cancel gift card feature

This commit is contained in:
Gabriel Bazán 2016-08-03 10:05:20 -03:00 committed by Gustavo Maximiliano Cortez
commit de6107206e
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
3 changed files with 32 additions and 0 deletions

View file

@ -2,6 +2,18 @@
angular.module('copayApp.controllers').controller('amazonCardDetailsController', function($scope, $log, $timeout, bwcError, amazonService, lodash, ongoingProcess) {
$scope.cancelGiftCard = function() {
ongoingProcess.set('Canceling gift card...', true);
amazonService.cancelGiftCard($scope.card, function(err, data) {
ongoingProcess.set('Canceling gift card...', false);
if (err) {
$scope.error = bwcError.msg(err);
return;
}
$scope.$emit('UpdateAmazonList');
});
};
$scope.remove = function() {
amazonService.savePendingGiftCard($scope.card, {
remove: true