diff options
| author | Gyulai Zoltan <[email protected]> | 2021-10-12 13:53:33 +0300 |
|---|---|---|
| committer | Gyulai Zoltan <[email protected]> | 2021-10-12 13:53:33 +0300 |
| commit | 92ffc6e2e597867a55b592a20b16c233efad9cef (patch) | |
| tree | 9bfad78872592637a241624de9edde36986b4b07 /routes/lightning/withdraw.js | |
| parent | 5f949a00ab98792db22bb5ab0104a06c714932f2 (diff) | |
| download | coinos-server-withdraw.tar.gz coinos-server-withdraw.zip | |
feat: added lightning withdrawal with hardcoded fee estimationwithdraw
Diffstat (limited to 'routes/lightning/withdraw.js')
| -rw-r--r-- | routes/lightning/withdraw.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/routes/lightning/withdraw.js b/routes/lightning/withdraw.js new file mode 100644 index 00000000..d1712d39 --- /dev/null +++ b/routes/lightning/withdraw.js @@ -0,0 +1,11 @@ +module.exports = ah(async (req, res) => { + let { amount, memo, payreq } = req.body; + let { user } = req; + + try { + res.send(await send(amount, memo, payreq, user, true)); + } catch (e) { + l.error("problem sending lightning withdrawal", user.username, e.message, e.stack); + res.status(500).send(e.message); + } +}); |
