From 92ffc6e2e597867a55b592a20b16c233efad9cef Mon Sep 17 00:00:00 2001 From: Gyulai Zoltan Date: Tue, 12 Oct 2021 13:53:33 +0300 Subject: feat: added lightning withdrawal with hardcoded fee estimation --- routes/lightning/withdraw.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 routes/lightning/withdraw.js (limited to 'routes/lightning') 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); + } +}); -- cgit v1.2.3