diff options
| author | Adam Soltys <[email protected]> | 2022-09-22 02:57:54 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-22 02:57:54 +0000 |
| commit | 3f18d0c8ab508553062bf92a17295961f91a4822 (patch) | |
| tree | 4608fc9f51820cdd48abc6352ddaf83f0e1208e3 /routes/lightning/channel.js | |
| parent | 45ae80bcde258622108c6d66e404660b0c037eb8 (diff) | |
| parent | 918813a6e49f9d05828f6fb205614f9d288269e1 (diff) | |
| download | coinos-server-3f18d0c8ab508553062bf92a17295961f91a4822.tar.gz coinos-server-3f18d0c8ab508553062bf92a17295961f91a4822.zip | |
Merge remote-tracking branch 'origin/master' into prod2
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); |
