Improve the error handling to expose and log errors if removing a card fails.
This commit is contained in:
parent
8199badb32
commit
1a2fea578d
4 changed files with 22 additions and 5 deletions
|
|
@ -11,7 +11,11 @@ angular.module('copayApp.controllers').controller('preferencesBitpayCardControll
|
|||
};
|
||||
|
||||
var remove = function(card) {
|
||||
bitpayCardService.remove(card, function() {
|
||||
bitpayCardService.remove(card, function(err) {
|
||||
if (err) {
|
||||
$scope.error = gettextCatalog.getString('Could not remove card');
|
||||
return;
|
||||
}
|
||||
$ionicHistory.clearHistory();
|
||||
$timeout(function() {
|
||||
$state.go('tabs.home');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue