diff options
| author | Adam Soltys <[email protected]> | 2022-10-08 00:34:34 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-10-08 00:34:34 -0700 |
| commit | 0fbba88257d0259f59ef86e34d83987d74824030 (patch) | |
| tree | 76c5b023755ede0f9075f5134dd5ff6aff538b06 /routes | |
| parent | 6eb65756c0945c149825f2fbe0f6cf173ffee2ef (diff) | |
| parent | 11052f0f494707206a9f6a245d6c24a9090ebf78 (diff) | |
| download | coinos-server-0fbba88257d0259f59ef86e34d83987d74824030.tar.gz coinos-server-0fbba88257d0259f59ef86e34d83987d74824030.zip | |
Merge remote-tracking branch 'origin/prod'
Diffstat (limited to 'routes')
| -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 14efdf2a..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, invoice.text); - store.convert[invoice.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, |
