Browse Source

logz

feature/dockerfile-arm
Evan Feenstra 5 years ago
parent
commit
9fa91def45
  1. 5
      api/utils/lightning.ts
  2. 3
      dist/api/utils/lightning.js
  3. 2
      dist/api/utils/lightning.js.map

5
api/utils/lightning.ts

@ -221,13 +221,13 @@ function listInvoices() {
}
async function listAllInvoices(){
console.log('=> list all invoices')
const invs = await paginateInvoices(40)
return invs
}
async function paginateInvoices(limit,i=0){
try{
const r:any = await listInvoicesPaginated(limit,i)
console.log(r)
const lastOffset = parseInt(r.first_index_offset)
if(lastOffset>0) {
return r.invoices.concat(await paginateInvoices(limit,lastOffset))
@ -282,7 +282,8 @@ function listPaymentsPaginated(limit, offset) {
})
}
function listAllPayments() {
function listAllPayments() {
console.log('=> list all payments')
return new Promise(async(resolve, reject)=> {
const lightning = await loadLightning()
lightning.listPayments({}, (err, response) => {

3
dist/api/utils/lightning.js

@ -246,6 +246,7 @@ function listInvoices() {
exports.listInvoices = listInvoices;
function listAllInvoices() {
return __awaiter(this, void 0, void 0, function* () {
console.log('=> list all invoices');
const invs = yield paginateInvoices(40);
return invs;
});
@ -255,7 +256,6 @@ function paginateInvoices(limit, i = 0) {
return __awaiter(this, void 0, void 0, function* () {
try {
const r = yield listInvoicesPaginated(limit, i);
console.log(r);
const lastOffset = parseInt(r.first_index_offset);
if (lastOffset > 0) {
return r.invoices.concat(yield paginateInvoices(limit, lastOffset));
@ -321,6 +321,7 @@ function listPaymentsPaginated(limit, offset) {
}));
}
function listAllPayments() {
console.log('=> list all payments');
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
const lightning = yield loadLightning();
lightning.listPayments({}, (err, response) => {

2
dist/api/utils/lightning.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save