diff options
| author | Adam Soltys <[email protected]> | 2022-10-08 07:06:08 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-10-08 07:06:08 +0000 |
| commit | 11052f0f494707206a9f6a245d6c24a9090ebf78 (patch) | |
| tree | 013c0b4395775e82aad06570ee1f8e3494fd6c82 | |
| parent | 68a4352c18191654eb10e0c976168ac729041d0a (diff) | |
| download | coinos-server-11052f0f494707206a9f6a245d6c24a9090ebf78.tar.gz coinos-server-11052f0f494707206a9f6a245d6c24a9090ebf78.zip | |
fix lightning conversions
| -rw-r--r-- | routes/invoices.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routes/invoices.js b/routes/invoices.js index 7c11bac3..bdb889a2 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -67,11 +67,6 @@ app.post("/invoice", optionalAuth, async (req, res, next) => { if (tip > amount || tip > 1000000 || tip < 0) throw new Error("tip amount out of range"); - if (liquidAddress) { - l("conversion request for", liquidAddress, text); - store.convert[text] = { address: liquidAddress, tx }; - } - if (!user) ({ user } = req); else { user = await db.User.findOne({ @@ -125,6 +120,11 @@ app.post("/invoice", optionalAuth, async (req, res, next) => { invoice.text = bip21(invoice, user.account); } + if (liquidAddress) { + l("conversion request for", liquidAddress, text); + store.convert[text] = { address: liquidAddress, tx }; + } + l( "creating invoice", user.username, |
