Merge pull request #5094 from ajp8164/bug/improve-remove-card-error-handling
Improve the error handling to expose and log errors if removing a car…
This commit is contained in:
commit
523379c6a3
3 changed files with 19 additions and 6 deletions
|
|
@ -63,7 +63,9 @@ angular.module('copayApp.controllers').controller('bitpayCardController', functi
|
|||
|
||||
if (err) {
|
||||
$log.error(err);
|
||||
$scope.error = gettextCatalog.getString('Could not get transactions');
|
||||
self.bitpayCardTransactionHistory = null;
|
||||
self.bitpayCardCurrentBalance = null;
|
||||
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Could not get transactions'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,10 @@ angular.module('copayApp.controllers').controller('preferencesBitpayCardControll
|
|||
};
|
||||
|
||||
var remove = function(card) {
|
||||
bitpayCardService.remove(card, function() {
|
||||
bitpayCardService.remove(card, function(err) {
|
||||
if (err) {
|
||||
return popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Could not remove card'));
|
||||
}
|
||||
$ionicHistory.clearHistory();
|
||||
$timeout(function() {
|
||||
$state.go('tabs.home');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue