bug fix: id to channel_id

This commit is contained in:
ShahanaFarooqui 2023-08-15 11:45:54 -07:00
parent d875779ba6
commit 9768963862
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ export const listChannels = (req, res, next) => {
request(options).then((body) => { request(options).then((body) => {
body?.map((channel) => { body?.map((channel) => {
if (!channel.alias || channel.alias === '') { if (!channel.alias || channel.alias === '') {
channel.alias = channel.id.substring(0, 20); channel.alias = channel.channel_id.substring(0, 20);
} }
const local = channel.to_us_msat || 0; const local = channel.to_us_msat || 0;
const remote = (channel.total_msat - local) || 0; const remote = (channel.total_msat - local) || 0;

View File

@ -35,7 +35,7 @@ export const listChannels = (req, res, next) => {
options.url = req.session.selectedNode.ln_server_url + '/v1/channel/listPeerChannels'; options.url = req.session.selectedNode.ln_server_url + '/v1/channel/listPeerChannels';
request(options).then((body) => { request(options).then((body) => {
body?.map((channel) => { body?.map((channel) => {
if (!channel.alias || channel.alias === '') { channel.alias = channel.id.substring(0, 20); } if (!channel.alias || channel.alias === '') { channel.alias = channel.channel_id.substring(0, 20); }
const local = channel.to_us_msat || 0; const local = channel.to_us_msat || 0;
const remote = (channel.total_msat - local) || 0; const remote = (channel.total_msat - local) || 0;
const total = channel.total_msat || 0; const total = channel.total_msat || 0;