better error handler

This commit is contained in:
Gabriel Bazán 2016-11-14 12:53:43 -03:00
commit a30845d686
5 changed files with 14 additions and 36 deletions

View file

@ -178,8 +178,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 = err;
$log.error(err);
} else {
wallet.error = null;
wallet.status = status;
}
if (++j == i) {