Browse Source

paginate listpayments

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

6
api/utils/lightning.ts

@ -254,7 +254,7 @@ function listInvoicesPaginated(limit, offset) {
} }
// need to upgrade to .10 for this // need to upgrade to .10 for this
async function listAllPaymentsPaginated(){ async function listAllPayments(){
const invs = await paginatePayments(40) // max num const invs = await paginatePayments(40) // max num
return invs return invs
} }
@ -284,7 +284,7 @@ function listPaymentsPaginated(limit, offset) {
}) })
} }
function listAllPayments() { function listAllPaymentsFull() {
console.log('=> list all payments') console.log('=> list all payments')
return new Promise(async(resolve, reject)=> { return new Promise(async(resolve, reject)=> {
const lightning = await loadLightning() const lightning = await loadLightning()
@ -397,5 +397,5 @@ export {
listAllPayments, listAllPayments,
checkConnection, checkConnection,
listAllInvoices, listAllInvoices,
listAllPaymentsPaginated, listAllPaymentsFull,
} }

8
dist/api/utils/lightning.js

@ -284,13 +284,13 @@ function listInvoicesPaginated(limit, offset) {
})); }));
} }
// need to upgrade to .10 for this // need to upgrade to .10 for this
function listAllPaymentsPaginated() { function listAllPayments() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const invs = yield paginatePayments(40); // max num const invs = yield paginatePayments(40); // max num
return invs; return invs;
}); });
} }
exports.listAllPaymentsPaginated = listAllPaymentsPaginated; exports.listAllPayments = listAllPayments;
function paginatePayments(limit, i = 0) { function paginatePayments(limit, i = 0) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try { try {
@ -321,7 +321,7 @@ function listPaymentsPaginated(limit, offset) {
}); });
})); }));
} }
function listAllPayments() { function listAllPaymentsFull() {
console.log('=> list all payments'); console.log('=> list all payments');
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
const lightning = yield loadLightning(); const lightning = yield loadLightning();
@ -335,7 +335,7 @@ function listAllPayments() {
}); });
})); }));
} }
exports.listAllPayments = listAllPayments; exports.listAllPaymentsFull = listAllPaymentsFull;
const signMessage = (msg) => { const signMessage = (msg) => {
return new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
let lightning = yield loadLightning(); let lightning = yield loadLightning();

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

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