aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lightning/channelRequest.js
diff options
context:
space:
mode:
Diffstat (limited to 'routes/lightning/channelRequest.js')
-rw-r--r--routes/lightning/channelRequest.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/routes/lightning/channelRequest.js b/routes/lightning/channelRequest.js
index 96b6d71f..3aecaa61 100644
--- a/routes/lightning/channelRequest.js
+++ b/routes/lightning/channelRequest.js
@@ -1,10 +1,13 @@
-export default ah(async (req, res) => {
+import { lnurlServer } from "../lnurl.js";
+
+export default async (req, res) => {
let { localAmt, pushAmt } = req.body;
pushAmt = 0;
try {
- if (localAmt < 20000) throw new Error("amount must be greater than 20000 SAT");
+ if (localAmt < 20000)
+ throw new Error("amount must be greater than 20000 SAT");
if (localAmt > 1000000) throw new Error("amount must be <= 1000000");
const result = await lnurlServer.generateNewUrl("channelRequest", {
@@ -17,4 +20,4 @@ export default ah(async (req, res) => {
l.error("problem generating channel request", e.message);
res.status(500).send(e.message);
}
-});
+};