Merge pull request #5028 from gabrielbazan7/fix/handleError

better error handler
This commit is contained in:
Gustavo Maximiliano Cortez 2016-11-14 17:36:29 -03:00 committed by GitHub
commit 0a7ba4bd02
5 changed files with 20 additions and 66 deletions

View file

@ -196,8 +196,11 @@ angular.module('copayApp.controllers').controller('tabHomeController',
lodash.each($scope.wallets, function(wallet) {
walletService.getStatus(wallet, {}, function(err, status) {
if (err) {
if (err === 'WALLET_NOT_REGISTERED') wallet.error = gettextCatalog.getString('Wallet not registered');
else wallet.error = gettextCatalog.getString('Could not update');;
$log.error(err);
} else {
wallet.error = null;
wallet.status = status;
}
if (++j == i) {