Merge pull request #513 from gabrielbazan7/fix/history

better messages in advanced transaction history options
This commit is contained in:
Gustavo Maximiliano Cortez 2016-10-17 17:13:23 -03:00 committed by GitHub
commit 3ac30e8472
2 changed files with 20 additions and 11 deletions

View file

@ -28,8 +28,14 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
$log.debug('Generating CSV from History');
getHistory(function(err, txs) {
if (err || lodash.isEmpty(txs)) {
if (err) $log.warn('Failed to generate CSV:', err);
else $log.warn('Failed to generate CSV: no transactions');
if (err) {
$log.warn('Failed to generate CSV:', err);
$scope.err = err;
}
else {
$log.warn('Failed to generate CSV: no transactions');
$scope.err = 'no transactions';
}
if (cb) return cb(err);
return;
}