Rebuild compiled cln/channels.js to match its source (#1606)

The #1606 fix added 'channel.connected = !!channel.peer_connected' to
server/controllers/cln/channels.ts but the committed compiled artifact
backend/controllers/cln/channels.js was never regenerated, leaving it stale.
Rebuild it so the committed backend output matches its TypeScript source.
This commit is contained in:
saubyk 2026-07-17 23:21:33 -07:00 committed by Suheb
parent e0fce065d5
commit c2b8670099
2 changed files with 14 additions and 0 deletions

View file

@ -21,6 +21,11 @@ export const listPeerChannels = (req, res, next) => {
const getPeerAliasesTasks = body.channels.map((channel) => () => {
channel.to_them_msat = channel.total_msat - channel.to_us_msat;
channel.balancedness = (channel.total_msat === 0) ? 1 : (1 - Math.abs((channel.to_us_msat - channel.to_them_msat) / channel.total_msat)).toFixed(3);
// listpeerchannels reports connection state as peer_connected. Mirror it onto the
// documented legacy 'connected' field (see the Channel model) as a real boolean, so
// any backward-compat consumer of this endpoint gets a defined true/false rather than
// undefined when peer_connected is absent (issue #1606).
channel.connected = !!channel.peer_connected;
return getAlias(req.session.selectedNode, channel, 'peer_id');
});
common.runWithConcurrencyLimit(getPeerAliasesTasks, 20, () => {