diff options
Diffstat (limited to 'routes/lightning/channel.js')
| -rw-r--r-- | routes/lightning/channel.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/routes/lightning/channel.js b/routes/lightning/channel.js index 1c7bab10..107896f4 100644 --- a/routes/lightning/channel.js +++ b/routes/lightning/channel.js @@ -1,6 +1,7 @@ import axios from "axios"; import { addPeer, getIdentity } from "lightning"; import lnd from "$lib/lnd"; +import ln from "$lib/ln"; export default async (req, res) => { const { params } = req.body; @@ -24,7 +25,11 @@ export default async (req, res) => { const { callback, k1 } = params; let remoteid; try { - remoteid = (await getIdentity({ lnd })).public_key; + if (config.lna.clightning) { + remoteid = (await ln.getinfo()).id; + } else { + remoteid = (await getIdentity({ lnd })).public_key; + } } catch (e) { err("problem getting lightning node info", e.message); return res.code(500).send(e.message); |
