This commit is contained in:
Gabriel Bazán 2015-11-10 12:49:12 -03:00
parent 5eea2869a3
commit 934a42f2bd
1 changed files with 7 additions and 6 deletions

View File

@ -37,13 +37,11 @@ angular.module('copayApp.controllers').controller('backupController',
self.getMetaData = function(cb) { self.getMetaData = function(cb) {
self.getHistoryCache(function(err, txsFromLocal) { self.getHistoryCache(function(err, txsFromLocal) {
if (err) { if (err) return cb(err);
return cb(err);
}
self.getAddressbook(function(err, localAddressBook) { self.getAddressbook(function(err, localAddressBook) {
if (err) { if (err) return cb(err);
return cb(err);
}
return cb(null, txsFromLocal, localAddressBook) return cb(null, txsFromLocal, localAddressBook)
}); });
}); });
@ -60,6 +58,8 @@ angular.module('copayApp.controllers').controller('backupController',
} catch (ex) { } catch (ex) {
$log.warn(ex); $log.warn(ex);
} }
if (!localTxs[0]) return cb(null, null);
return cb(null, localTxs); return cb(null, localTxs);
}); });
} }
@ -74,6 +74,7 @@ angular.module('copayApp.controllers').controller('backupController',
} catch (ex) { } catch (ex) {
$log.warn(ex); $log.warn(ex);
} }
return cb(null, localAddressBook); return cb(null, localAddressBook);
}); });
} }