diff options
| author | Adam Soltys <[email protected]> | 2022-09-20 22:48:18 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-20 22:48:18 -0700 |
| commit | 4569736bac949bd2b06ce03b11299b11984e8d3c (patch) | |
| tree | d4e7c71c5be97903a43e0e25f816b2a4b9fde0a5 /routes/lightning/channel.js | |
| parent | f2fb6b587bb171101b0f91722c0c29e358b386e0 (diff) | |
| parent | b53875cf6bdf47c359139aa846c6597fa3627c87 (diff) | |
| download | coinos-server-4569736bac949bd2b06ce03b11299b11984e8d3c.tar.gz coinos-server-4569736bac949bd2b06ce03b11299b11984e8d3c.zip | |
Merge branch 'master' into prod
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); |
