Handle errors. Cancel gift card

This commit is contained in:
Gustavo Maximiliano Cortez 2016-05-19 17:29:24 -03:00
commit b0d24c6814
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
6 changed files with 238 additions and 63 deletions

View file

@ -45,11 +45,12 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
});
} catch (e) {
$log.debug(e);
};
};
};
$scope.openWalletsModal = function(wallets) {
self.error = null;
self.errorInfo = null;
var ModalInstanceCtrl = function($scope, $modalInstance) {
$scope.type = 'SELL';
$scope.wallets = wallets;
@ -104,6 +105,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
this.createTx = function() {
self.error = null;
self.errorInfo = null;
var currency_code = configService.getSync().amazon.testnet ? window.amazon_sandbox_currency_code : window.amazon_currency_code;
var dataSrc = {
@ -178,6 +180,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
self.loading = null;
if (err) {
self.error = err;
self.errorInfo = gift;
return;
}
self.giftCard = giftCard;