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

@ -24,11 +24,13 @@ angular.module('copayApp.controllers').controller('bitpayCardIntroController', f
obj.otp = otp;
bitpayCardService.bitAuthPair(obj, function(err, data) {
if (err) {
popupService.showAlert(null, err);
popupService.showAlert(gettextCatalog.getString('Error'), err);
return;
}
var title = gettextCatalog.getString('Add BitPay Card Account?');
var msg = gettextCatalog.getString('Would you like to add this account ({{email}}) to your wallet?', {email: obj.email});
var msg = gettextCatalog.getString('Would you like to add this account ({{email}}) to your wallet?', {
email: obj.email
});
var ok = gettextCatalog.getString('Add Account');
var cancel = gettextCatalog.getString('Go back');
popupService.showConfirm(title, msg, ok, cancel, function(res) {
@ -43,7 +45,9 @@ angular.module('copayApp.controllers').controller('bitpayCardIntroController', f
});
$state.go('tabs.home').then(function() {
if (data.cards[0]) {
$state.transitionTo('tabs.bitpayCard', {id: data.cards[0].id});
$state.transitionTo('tabs.bitpayCard', {
id: data.cards[0].id
});
}
});
});