mirror of https://github.com/BTCPrivate/copay.git
refactor
This commit is contained in:
parent
5eea2869a3
commit
934a42f2bd
|
@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue