Skip to content

Commit

Permalink
bug fix: id to channel_id
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahanaFarooqui committed Aug 15, 2023
1 parent d875779 commit 9768963
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/controllers/cln/channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const listChannels = (req, res, next) => {
request(options).then((body) => {
body?.map((channel) => {
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 remote = (channel.total_msat - local) || 0;
Expand Down
2 changes: 1 addition & 1 deletion server/controllers/cln/channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const listChannels = (req, res, next) => {
options.url = req.session.selectedNode.ln_server_url + '/v1/channel/listPeerChannels';
request(options).then((body) => {
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 remote = (channel.total_msat - local) || 0;
const total = channel.total_msat || 0;
Expand Down

0 comments on commit 9768963

Please sign in to comment.