Merge pull request #48 from gabrielbazan7/fix/prefHistory
fix error on preferences history when there is no transactions
This commit is contained in:
commit
73ac243ce0
1 changed files with 3 additions and 3 deletions
|
|
@ -28,12 +28,12 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
|
||||||
|
|
||||||
$log.debug('Generating CSV from History');
|
$log.debug('Generating CSV from History');
|
||||||
getHistory(function(err, txs) {
|
getHistory(function(err, txs) {
|
||||||
if (err || !txs) {
|
if (err || lodash.isEmpty(txs)) {
|
||||||
$log.warn('Failed to generate CSV:', err);
|
if (err) $log.warn('Failed to generate CSV:', err);
|
||||||
|
else $log.warn('Failed to generate CSV: no transactions');
|
||||||
if (cb) return cb(err);
|
if (cb) return cb(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$log.debug('Wallet Transaction History Length:', txs.length);
|
$log.debug('Wallet Transaction History Length:', txs.length);
|
||||||
|
|
||||||
$scope.satToUnit = 1 / $scope.unitToSatoshi;
|
$scope.satToUnit = 1 / $scope.unitToSatoshi;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue