fix alert messages

This commit is contained in:
Gabriel Bazán 2016-10-26 17:10:21 -03:00
commit f6806fcdf3
11 changed files with 38 additions and 33 deletions

View file

@ -28,7 +28,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
if ($scope.paypro) {
return setFromPayPro($scope.paypro, function(err) {
if (err && !isChromeApp) {
popupService.showAlert(gettext('Could not fetch payment'));
popupService.showAlert(gettextCatalog.getString('Error'), gettext('Could not fetch payment'));
}
});
}
@ -159,7 +159,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
if (!wallet) return cb();
if (isChromeApp) {
popupService.showAlert(gettextCatalog.getString('Payment Protocol not supported on Chrome App'));
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Payment Protocol not supported on Chrome App'));
return cb(true);
}
@ -178,13 +178,13 @@ angular.module('copayApp.controllers').controller('confirmController', function(
if (msg.match('HTTP')) {
msg = gettextCatalog.getString('Could not fetch payment information');
}
popupService.showAlert(msg);
popupService.showAlert(gettextCatalog.getString('Error'), msg);
return cb(true);
}
if (!paypro.verified) {
$log.warn('Failed to verify payment protocol signatures');
popupService.showAlert(gettextCatalog.getString('Payment Protocol Invalid'));
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Payment Protocol Invalid'));
return cb(true);
}
@ -338,7 +338,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.approve = function(onSendStatusChange) {
if ($scope._paypro && $scope.paymentExpired.value) {
popupService.showAlert(null, gettextCatalog.getString('The payment request has expired'));
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('The payment request has expired'));
$scope.sendStatus = '';
$timeout(function() {
$scope.$apply();