From 70abf7af25ea0e2970ec89b03f9c6f42829c8084 Mon Sep 17 00:00:00 2001 From: Shahana Farooqui <23240721+ShahanaFarooqui@users.noreply.github.com> Date: Sun, 7 Aug 2022 16:43:17 -0700 Subject: [PATCH] Removed sorting from CLN paginated list forwards Removed sorting from CLN paginated list forwards --- backend/controllers/cln/channels.js | 6 ++---- frontend/index.html | 2 +- frontend/main.114eb43a7d4c0e46.js | 1 - frontend/main.f7b1d554d6bf2f0b.js | 1 + server/controllers/cln/channels.ts | 6 ++---- src/app/cln/store/cln.effects.ts | 10 +++++----- 6 files changed, 11 insertions(+), 15 deletions(-) delete mode 100644 frontend/main.114eb43a7d4c0e46.js create mode 100644 frontend/main.f7b1d554d6bf2f0b.js diff --git a/backend/controllers/cln/channels.js b/backend/controllers/cln/channels.js index 20cc6dd6..89eb8b42 100644 --- a/backend/controllers/cln/channels.js +++ b/backend/controllers/cln/channels.js @@ -147,16 +147,14 @@ export const listForwardsPaginated = (req, res, next) => { if (options.error) { return res.status(options.statusCode).json({ message: options.message, error: options.error }); } - const { status, maxLen, offset, sortBy, sortOrder } = req.query; + const { status, maxLen, offset } = req.query; let queryStr = '?status=' + (status ? status : 'settled'); queryStr = queryStr + '&maxLen=' + (maxLen ? maxLen : '10'); queryStr = queryStr + '&offset=' + (offset ? offset : '0'); - queryStr = sortBy ? (queryStr + '&sortBy=' + sortBy) : (queryStr + ''); - queryStr = sortOrder ? (queryStr + '&sortOrder=' + sortOrder) : (queryStr + ''); options.url = req.session.selectedNode.ln_server_url + '/v1/channel/listForwardsPaginated' + queryStr; logger.log({ selectedNode: req.session.selectedNode, level: 'DEBUG', fileName: 'Channels', msg: 'Paginated Forwarding History url' + options.url }); request.get(options).then((body) => { - logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Channels', msg: 'Paginated Forwarding History Received For Status' + req.query.status, data: body }); + logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Channels', msg: 'Paginated Forwarding History Received For Status ' + req.query.status, data: body }); res.status(200).json(body); }).catch((errRes) => { const err = common.handleError(errRes, 'Channels', 'Paginated Forwarding History Error', req.session.selectedNode); diff --git a/frontend/index.html b/frontend/index.html index b4d141ff..01fbaa2e 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -13,6 +13,6 @@