diff options
| author | Adam Soltys <[email protected]> | 2023-01-11 22:09:48 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-12 15:44:13 -0800 |
| commit | c3565838644123e77881ff4f8536792f074047b9 (patch) | |
| tree | 96da43fd19940d2f0836e43a511f0a1fb365044d /routes/lightning/channelRequest.js | |
| parent | ded2c69ce89438326523a512b570be6eee4b23f0 (diff) | |
| download | coinos-server-c3565838644123e77881ff4f8536792f074047b9.tar.gz coinos-server-c3565838644123e77881ff4f8536792f074047b9.zip | |
migrating to redis
Diffstat (limited to 'routes/lightning/channelRequest.js')
| -rw-r--r-- | routes/lightning/channelRequest.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/routes/lightning/channelRequest.js b/routes/lightning/channelRequest.js deleted file mode 100644 index 74e4cbba..00000000 --- a/routes/lightning/channelRequest.js +++ /dev/null @@ -1,24 +0,0 @@ -import { lnurlServer } from "$routes/lnurl"; -import { err } from "$lib/logging"; - -export const channelRequest = 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 > 1000000) throw new Error("amount must be <= 1000000"); - - const result = await lnurlServer.generateNewUrl("channelRequest", { - localAmt, - pushAmt - }); - - res.send(result); - } catch (e) { - err("problem generating channel request", e.message); - res.code(500).send(e.message); - } -}; |
